Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
hacker news user filter
var users = {
"friend" : 1,
"foe" : 0
};
$("<style type='text/css'>span.djs-highlight { font-weight: bold; }</style>").appendTo("head");
function traverseFromUserLink(el) {
return $(el).closest('td').find('span.comment');
}
function hideIt(userLink) {
traverseFromUserLink(userLink).html("[blah blah blah blah]");
}
function highlightIt(userLink) {
traverseFromUserLink(userLink).addClass("djs-highlight");
}
$('span.comhead a[href^="user?id="]').each(function(index, userLink){
var user = $(userLink).text();
if (users[user] === 0) {
hideIt(userLink);
} else if (users[user] === 1) {
highlightIt(userLink);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.