2
0

Make Google Faster and Private


               
2016 Aug 2, 3:40pm   2,111 views  8 comments

by Dan8267   follow (4)  

Google tracks your clicks on search results. And this could be done in a benevolent way to improve search results while respecting anonymity. Unfortunately Google has become increasingly creepy about knowing everything about you. Also, the way in which Google implements its click tracking slows downs getting to the web page and makes it a royal pain in the butt to copy the link location.

Often times I want to give a reference on Patrick.net to a study that is available online as a PDF. However Google obfuscates this URL to enable it's link tracking making it worthless for copying and pasting into a post.

Here's an example. A search for "Emma Watson" brings up the IMDB page for her in the search results. The URL for that result is
https://www.google.com/url?sa=t&rct=j&q=&esrs&source=web&cd=7&cad=rja&uact=8&sqi=2&ved=0ahUKEwjthMjD3KPOAhWFkx4KHYXKDHwQFgg4MAY&url=http%3A%2F%2Fwww.imdb.com%2Fname%2Fnm0914612%2F&usg=AFQjCNGNghBxXzrMGqaAWZ7qdwlvGhAuWA&bvm=bv.128617741,d.dmo

Ow, that's an eyeful. What I really want is
http://www.imdb.com/name/nm0914612/

Much better. It's readable. I can copy and paste it. It doesn't waste time going through Google's click tracking, and it preserves my privacy.

I want this to happen automagically for all my search results in Google. So I wrote a little GreaseMonkey script.

If you want to use it as well, install GreaseMonkey if you haven't already and then add the following user script. Grease Monkey is a Firefox plugin, but there may be an extension for Chrome that does the same thing.

The script can be located at Github. The script page is
https://gist.github.com/Dan8267/4084af94d588e77f7ea2f28d2ce8985e

The raw script can be copied or installed from
https://gist.githubusercontent.com/Dan8267/4084af94d588e77f7ea2f28d2ce8985e/raw/f93855895aca550feab4f39e62279d00d61d7a4a/degoogle.js

If Firefox doesn't prompt you for installing a GreaseMonkey script when clicking the raw script URL, then you have to manually install the script using the Firefox menu under Tools...New User Script. Fill in "degoogle" as the script name, "Dan8267" as the namespace, click OK, and then paste in the script from the raw script URL above.

I'm liking using Google without it tracking my clicks or slowing me down. Do note that Google can still track your searches, just not what you clicked on. Oh, and yes, this script even works for the search as you type feature of Google.

#scitech

Comments 1 - 8 of 8        Search these comments

1   Dan8267   2016 Aug 2, 3:43pm  

Oh, and a side benefit of this script is that you can still click on Google ads and get to the underlying webpage even if you have Google's ad network blocked in your hosts file. I.e.

0.0.0.0 www.googleadservices.com

2   HEY YOU   2016 Aug 2, 5:51pm  

Hey Google,
I'm going to type in "FUCK GOOGLE" for my next search.

When Trump said "rigged", he must have been talking about technology.
Please don't tell me that all the large tech companies would do anything improper.
How about the alphabet soup,(NSA ,FBI,CIA), of the Democrat & Republican voters
big govt. that they elected.

You have no privacy,you have owners.

4   Patrick   2016 Aug 3, 9:12am  

that's interesting. so all you have to do is set the "onmousedown" callback on each link to be the empty string?

5   Dan8267   2016 Aug 3, 10:21am  

rando says

that's interesting. so all you have to do is set the "onmousedown" callback on each link to be the empty string?

Yes, the hack was far easier than I anticipated. I had expected to filter the URLs by a regular expression that would match against the /url?...&url=... and then extract the "url" URL parameter, decode it, and replace the href attribute of the anchor tag.

But it turned out the href attribute was already the untracted, plain URL. The only reason clicking or copying the URL caused the tracted URL to be loaded or copy was the mousedown event handler. Remove it let's the URLs behave like normal.

Evidently the programmer who coded the click-tracking did it in a hacky way that was easy to dehack.

7   c1561490   2017 Feb 2, 7:13pm  

Dan8267 says

Evidently the programmer who coded the click-tracking did it in a hacky way that was easy to dehack.

It's the high quality way - it works for clients that don't/can't have javascript enabled.

8   bob2356   2017 Feb 2, 7:29pm  

Dan8267 says

Do note that Google can still track your searches, just not what you clicked on.

Simple solution. Use a proxy service.

Please register to comment:

api   best comments   contact   latest images   memes   one year ago   users   suggestions   gaiste