zl程序教程

您现在的位置是:首页 >  其他

当前栏目

cnblogs中在闪存中屏蔽某人的实现代码

代码 实现 屏蔽 闪存 某人
2023-06-13 09:14:25 时间
复制代码代码如下:

varunlikes=["zhang523012313","yangtongnet"];
functiondelUnlike(filter,expr){
$(filter).filter(function(){
varhref=$(this).find(expr).attr("href");
for(vari=0;i<unlikes.length;i++){
if(href.indexOf(unlikes[i])>0)returntrue;
}
returnfalse;
}).remove();
}

functionclearUnlike(n){
setTimeout(function(){
delUnlike(".avatar_listli","a");//头像
delUnlike("#feed_listli:visible","a");//闪存列表
delUnlike(".ing_commentsli:visible","a:last");//评论
delUnlike(".ing_top_listli","a");//热门闪存
delUnlike("#ing_comment_recent_blockdiv","a");//最新回复
},n);
}
vargetComments=GetRecentComments;
functionGetRecentComments(){
getComments();
clearUnlike(1000);
clearUnlike(3000);
}

在浏览器的JavaScript控制台运行(如Firefox的firebug)一下,刷新,世界终于清净了。

想要添加黑名单,只要在控制台中执行unlikes.push("某人ID")即可。