Thursday, August 16, 2012

Hiding multiple results from the same domain in google search

A few months ago Google changed their search result behavior.  Before, it would display one or two results from a single domain, and then give a link for more.  After the change, it simply displayed all of them.  This was made much worse by setting your results per page above the default 10.  This was ridiculously annoying, to the point where I'm inclined to believe the conspiracy theories I read that Google did it to discourage people from setting the results higher than default and thus seeing less ads.  I simply can't believe that Google thinks this is a legitimate improvement.

At this point, I should point out that all this really only applied if you turned off that crazy automatic search thing, and set your results per page to something high.  I had pretty much assumed that everyone on Earth did this, but the fact that there wasn't a solution online after months tends to suggest that they don't.

I asked about this on stackexchange, but was surprised to get no solution.  Although the fact that the question got a few votes suggested that other people were annoyed by this as well.

So, I decided to learn some more javascript by making a greasemonkey script to fix the results.   I was almost deterred by the lack of formatting in the Google search results page, but a quick online formatter made it workable.  Then, I had to figure out more of that javascript dot notation that I hate.  All in all though, it went well.  I wrote a basic script and uploaded it to userscripts.

http://userscripts.org/scripts/show/141480

As of now, it just looks at each result and if it's the same as the previous result it hides it.  This means you will get less results displayed on a page than whatever you have it set to.  I wrote a second version that counts how many duplicate domains there are in a row and hides them if there are more than a set limit, but I kind of like the simplicity of the current version.  I will try to use it for a while and see what improvements I could make, as well as if anyone actually uses it.

1 comment:

  1. Dale, thank you for creating this script. The new google search "features" were making my life miserable.

    Been browsing your blog and I've bookmarked it. So refreshing to randomly stumble upon an intelligent, logical person. Keep up the good work, thanks again.

    ReplyDelete