Close

More - Blacklisting an Author

A project log for UserScript to blacklist tags on hackaday.com

A simple UserScript for GreaseMonkey / TamperMonkey that will delete articles from hackaday.com/* that contain any of the blacklisted tags.

daniel-wardDaniel Ward 04/07/2015 at 03:191 Comment

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

Benchoff wrote 04/07/2015 at 03:41 point

I FULLY SUPPORT THIS

  Are you sure? yes | no