Greasemonkey script to remove unwanted results from Google

For myself, for future reference:

[sourcecode lang="js"]
// ==UserScript==
// @name           Expert blocker
// @namespace      my
// @description    Eliminate Experts Exchange results from Google searches.
// @include        http://*.google.com/search?*
// @include        http://*.google.co.uk/search?*
// ==/UserScript==

var results = document.getElementsByTagName("a");
for ( var i=0; i<results.length; i++ ) {
	if (
		results[i].href.indexOf("http:/ /www.experts-exchange.com") == 0
		|| results[i].href.indexOf("http:/ /swik.net") == 0 ) {
		results[i].parentNode.parentNode.style.display = "none";
	}
}
[/sourcecode]

Before using, in the URLs replace http:/ / with http://.

One Response to “Greasemonkey script to remove unwanted results from Google”

  1. Annoying List Says:

    Sweet simple working script mate ! thanks !

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>