And to blacklist authors:
// ==UserScript==
// @name Blacklist Authors
// @namespace http://www.google.com/
// @version 0.1
// @description Change the blacklist_authors array to suit
// @author dddanmar
// @match http://hackaday.com/*
// @grant none
// ==/UserScript==
var articles = document.getElementsByTagName("article");
var blacklist_authors = ["brianbenchoff"]
for(var i = 0; i < articles.length; i++){
author = articles[i].getElementsByClassName("author");
console.log(author[0].href)
for (var c = 0; c < blacklist_authors.length; c++){
if (author[0].href.indexOf(blacklist_authors[c]) > -1 ) {
console.log("Removing Article")
console.log(articles[i])
try {
articles[i].remove();
}
catch(err) {console.log("Article does not exist")}
console.log("Article removed")
}
}
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I FULLY SUPPORT THIS
Are you sure? yes | no