Google Domain Blocker

By vbrtrmn Last update Nov 9, 2011 — Installed 17,249 times.


Script Summary: Blocks irrelevant and spam domains.

Update

Fixed the script, I haven't had a lot of time lately to mess with it until today, sorry everyone.

Added Import/Export buttons, you can now dump your list to a JSON string and import it into another instance of Firefox, there is currently no way to automate this. I don't have time right now to setup a server.

Accidentally fixed FF3, I will try to keep it up-to-date, doubt I'll ever fix FF4, as the browser had way too many issues.

Google has implemented a domain blocking method, unfortunately it seems to only allow you to block certain domains. If you want to block amazon.com or anything popular you're out of luck. I always block sites like amazon.com and ebay.com, because the information I'm looking for rarely has anything to do with what they are selling. If Google implements a true blocking ability, this userscript will be discontinued, until then, I'll try to keep making updates.

Bug Reports and Feature Requests

Please post bug reports in the discussions section, I will not be checking the Issues and Reviews sections any more. It is too convoluted to go all over the place to get these.

Remember, I'm just one guy working on this project. I do try to answer all discussions and I have released many bug fixes, updates, and user requests. If you leave a clear message describing a problem or feature you'd like to see, I'll do my best to make an update for you. I test in Firefox on OSX/WinXP/Ubuntu I probably do not have the same configuration as each individual, please let me know what other add-ons and userscrips you're using, so I can try to match what you're seeing. If I can't duplicate the issue, I can't fix it.

About this Project

How many times do you search Google and find crappy results from search engine spam sites? Then you find them again and again. Well I got pretty sick of it, so I created this userscript.

Features

  • Blacklist Domain

    After searching for something, a new link is added to the Cached - Similar pages - Note this list, called Blacklist Domain. Clicking this will ask you to confirm blacklisting of that domain name.


  • Show/Hide Blacklist

    Look in the upper right hand corner, there is a new link called Show Blacklist, clicking this will show all of the domains you have blacklisted. If you click the red marker to the left of a particular domain, it will be removed from the list. You can also add in domains here, by typing them into the input and clicking the + button. If you remove an entry, you must refresh the page to see the updated search results.

  • Regular Expressions / Wildcards

    I've had several requests for wildcard matching, due to spam domains using multiple subdomains. I implemented this using regular expressions, then remembered that regular expressions for the average user is kind of a pain. In the preferences section, you can enable RegEx Blocker, this will block a full domain and all subdomains.

  • Preferences

    Allows you to enable and disable features in the userscript.

  • Import/Export Blacklist

    This is now implemented, you can select to import or export your blacklist. The data is output as a JSON string, just click export, copy the string and import it into another instance of Firefox.

    I'm planning on adding some kind of server-side component to this in the future, I just don't have time right now.

Updates

Nov 9, 2011 14:28

Fixed 'blacklist domain' duplication error. Thanks to user blindfold for finding it.

Nov 9, 2011 14:16

Fixed minor bug where 'blacklist domain' would duplicate itself on sublinks under a listing.

Oct 14, 2011 13:13

Removed MD5 hash code, I can't remember why I originally added this.

Oct 14, 2011 13:10

Fixed non-displaying Blacklist Domain

Jul 20, 2011 17:34

Added an additional video exclude

Jul 19, 2011 19:25

Changed resize listener to DOMSubtreeModified.

Fixed bug with domain not being able to be parsed.

Added license info for json2 section.

Jul 19, 2011 18:16

Alphabetized and @exclude list, mainly did this to make adding more excludes later on.

Changed the style of the Show/Hide Blacklist to match the treatment of the search page.

Jul 19, 2011 13:16

Added Import/Export options.

Jul 18, 2011 17:31

Fixed an issue where the script could not find the 'cite' block containing the domain name.

Jul 18, 2011 16:15

Added a ton of excludes.

Fixed a bug where the 'blacklist domain' text would not show up sometimes.

Jul 10, 2011 01:25

Fixed duplicating blacklist domain.

Added google plus to exclude list.

Jul 1, 2011 17:38

Fixed bug for FF5.

Discontinued support for FF3 and FF4.

Jun 27, 2011 12:40

Fixed text duplication bug.

Mar 8, 2011 16:59

Added google docs to the exclude list.

Mar 1, 2011 19:19

Changed jquery to get from https source.
Added google shopping to the exclude list.

Feb 17, 2011 13:38

Minor color update for yes/no confirmation.

Feb 17, 2011 12:07

Update for Google's new header.

Feb 16, 2011 11:26

Removed load from the window events, due to redundancy in previous bug fix.

Feb 16, 2011 11:23

Fixed blacklist display bug.
Removed original last update code.

Feb 14, 2011 18:20

Fixed small issue with new event listener code not checking for window height changes.

Feb 14, 2011 18:14

Removed polling code altogether and replaced with even listeners for resize/scroll/load

Feb 14, 2011 17:57

Reduced polling time to one second, this was causing extremely high CPU usage for several users.
Added update checker as listed @require Another Auto Updater Instructions.

Feb 9, 2011 16:18

Changed include list to http://*.google.*/* for requested internationalization support.
Fixed a positioning bug for internationalization.
Added support for google instant search.
Added a 500 ms timeout before the script inits, this was causing the blacklist to not display sometimes.

Feb 9, 2011 13:30

Fixed bug with domains displaying, like: www.ehow.com › Travel › Transportation › Airports

Feb 8, 2011 11:58

Minor bug fix causing div#searchform to render on top of the blacklist.

Feb 2, 2011 17:30

Added a last update display, pulls the last update from the userscript page.

Feb 2, 2011 17:08

Added possible fix for blacklist duping.
Fixed preferences defaults bug.
Added page reload for Blacklist Enable pref.
Fixed domain splitting bug.

Feb 1, 2011 21:28

Added basic instructions if blacklist is empty.

Feb 1, 2011 21:14

Blacklist domain matching error fixed.

Feb 1, 2011 20:59

Added preferences.
Added regular expression domain blocking
Updated styles.
Due to popular demand, now compatible with the AutoPagerize userscript!

Jan 25, 2011 22:35

Added all google search domains.

Dec 20, 2010 04:49

Complete rewrite using jQuery.

Sep 6, 2010 07:30

Minor bug fix.

Jul 1, 2010 21:18

Minor bug fix.

Aug 16, 2009 16:33

Minor bug fix.

Mar 9, 2009 07:06

Window resize junk added, don't remember what I was doing there.

Sep 4, 2008 20:49

Minor bug fix.

Sep 4, 2008 20:39

Initial release.

Known Issues

Chrome

There is currently no support for the Chrome browser, as it does not support basic greasemonkey functions. Chromium does not support @require, @resource, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue. If they decide to implement full support at some point, this script may start working.

No Blacklist Displaying

There is some kind of compatibility issue between this userscript and one or more Add-Ons, I'm trying to narrow down the issue.

Creative Commons License

Creative Commons License
Google Domain Blocker by http://userscripts.org/scripts/show/33156 is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.