Home >Web Front-end >JS Tutorial >cnblogs blocks someone's implementation code in flash_jquery

cnblogs blocks someone's implementation code in flash_jquery

WBOY
WBOYOriginal
2016-05-16 18:16:31973browse
Copy code The code is as follows:

var unlikes = ['zhang523012313', 'yangtongnet'];
function delUnlike(filter, expr) {
$(filter).filter(function() {
var href = $(this).find(expr).attr('href');
for (var i = 0; i < unlikes.length; i ) {
if (href.indexOf(unlikes[i]) > 0) return true;
}
return false;
}).remove();
}

function clearUnlike(n) {
setTimeout(function() {
delUnlike('.avatar_list li', 'a'); // Avatar
delUnlike('#feed_list li:visible', 'a'); //Flash list
delUnlike('.ing_comments li:visible', 'a:last'); //Comments
delUnlike ('.ing_top_list li', 'a'); //Popular flash
delUnlike('#ing_comment_recent_block div', 'a'); //Latest replies
}, n);
}
var getComments = GetRecentComments;
function GetRecentComments() {
getComments();
clearUnlike(1000);
clearUnlike(3000);
}

Run it in the browser's JavaScript console (such as Firefox's firebug), refresh it, and the world is finally clean.

To add to the blacklist, just execute unlikes.push('someone ID') in the console.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn