I have this Greasemonkey script, I originally wanted to get all the <table>
elements and search through those for but I couldn't get that to work. So I tried searching for the <a>
elements themselves and just hiding them if they contained "http://www.4chanscapepk.t35.com" but its not working either. What am I missing?
var results = document.getElementsByTagName("a");
for ( var i=0; i<results.length; i++ ) {
if (
results[i].href.indexOf("http://www.unwantedsites.com") == 0 ) {
results[i].parentNode.style.display = "none";
}
}