Created
November 8, 2009 01:41
-
-
Save tekkub/229021 to your computer and use it in GitHub Desktop.
Google domain blacklist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google domain blacklist | |
// @namespace http://www.google.com | |
// @description Removes results for specific domains from google. | |
// @include http://www.google.com/search* | |
// @include http://www.google.co.uk/search* | |
// ==/UserScript== | |
var blacklist = new Array("experts-exchange.com", "torrentreactor.to"); | |
for (domain in blacklist) { | |
var results = document.evaluate('//a[contains(@href, "' + domain + "/")]/..', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var result=null, i=0; result=results.snapshotItem(i); i++) {result.style.display='none';} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment