// ==UserScript==
// @name Remove Junk Style Links (Forums)
// @namespace http://choggi.dyndns.org
// @include http://forum.userstyles.org/*
// ==/UserScript==
//edit to suit your tastes (i = ignore case)
var hideThese = [/Facebook/i,/Tumblr/i,/facebook/i,/Appchan/i,/Reddit/i,/Gaia/i,/Google Reader/i,/4chan/];
//list all links in page
var linkList = document.getElementsByTagName("a");
var spanList = document.getElementsByTagName("span");
//loop through the links
for (var i = 0; i < linkList.length; i++){
var link = linkList[i].textContent;
//then check with the user list
for (var j = 0; j < hideThese.length; j++){
if (link.match(hideThese[j]) != null){
//hide it
var parent = linkList[i].parentNode.parentNode.parentNode;
if (parent.className.indexOf("Discussions") != -1){
linkList[i].parentNode.parentNode.style.display = "none";
}
}
}
}
//loop through the spans
for (var i = 0; i < spanList.length; i++){
var span = spanList[i].textContent;
//then check with the user list
for (var j = 0; j < hideThese.length; j++){
if (span.match(hideThese[j]) != null){
//hide it
var parent = spanList[i].parentNode.parentNode.parentNode;
if (parent.className.indexOf("Discussions") != -1){
spanList[i].parentNode.parentNode.style.display = "none";
}
}
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!