THIS IS A STATIC MIRROR OF USERSCRIPTS.ORG - LOGINS DO NOT WORK

Add "-site:[URL]" to searches

in
Subscribe to Add "-site:[URL]" to searches 3 posts, 2 voices



Mango Scriptwright
FirefoxWindows

If there are a lot of perm-blocked sites in your searches, you could end up with a page that has maybe one or two links on it. In order to get around this, I'd like an option to automatically add "-site:[URL]" to the search for every link in the block list. If you can get this to also apply to the first page of searches launched through the Firefox search box, that would be great.

 
Jefferson Scher Script's Author
FirefoxWindows

To add it on click doesn't sound too difficult, assuming Google will handle the number of sites. I'm not sure how I would modify the initial results page without reloading it with the revised query. Perhaps that's close enough?

 
Jefferson Scher Script's Author
FirefoxWindows

In version 1.5.2, I added an experimental feature that works as follows: after checking all the new results in the page, the script counts the results that are completely hidden (i.e., perma-ban or regular blocks without notices). If there are 3 or more of these completely hidden results, it modifies the query to exclude the domain of the first hidden result. This repeats until there are no more than 2 completely hidden results.

I only tested this lightly, so it is set up as a beta feature. To try it, check the box to "Enable beta features" toward the bottom of the Options tab in the Manage Hiding dialog and then reload your results.

If you prefer a different threshold for modifying the query, edit line 415 of the script as desired. (As of version 1.5.7, the line to edit is line 436.)

I look forward to feedback on this implementation and proposed improvements.