Exploring the digital life

Fixing Doubleclick Redirection with Greasemonkey

Keeping your information private in the Internet is getting harder and harder. Last weeks episode of the Security Now! podcast outlined how even Paypal is getting a little shady and redirecting links through It’s really crazy. Just about all their links contain redirection.

The whole topic is a little complex but to show you what I am talking about, this image is from before you even log in to PayPal (click to enlarge):


You’ll see the first part of the URL sends you through (everything to the left of the ‘?’ in the URL).

Fortunately, as mentioned during the podcast, Firefox users have the wonderful Greasemonkey extension. I’ve created a script called Doubleclick Relinker. This script takes all those links and strips off the redirection and rewrites them so they only contain the real link.


The script is designed to work on any page with doubleclick redirection links, not just PayPal. Give it a go. I have tested it but not extensively. If you modify it, let me know.

Technorati Tags: , , , ,

Loading Facebook Comments ...


  1. I just listened to SN 119, and as soon as they mentioned “someone will probably make a greasemonky script,” I did the search, found this, tested it, and it seems to work.

    This works for any site, correct?

    Comment by J — November 28, 2007 @ 9:05 am

  2. Yes, it should work for any site.

    Comment by admin — December 5, 2007 @ 6:21 pm

  3. Hi,


    Should upload your script to

    Take Care,


    Comment by Will — December 11, 2007 @ 1:27 am

  4. [...] Double Click Relinker Script – Script I wrote to prevent your click from being hijacked by Double Click [...]

    Pingback by Windows Software I Install - The TLW Blend — October 19, 2008 @ 11:44 pm

  5. Thank you! :)

    Comment by LightningRose — January 2, 2010 @ 6:23 pm

  6. This is a useful script and I’m sure works great. However, given the fact that GreaseMonkey is an attack surface for basic Firefox who load tons of trendy add-ons. I tell everyone to stay away from Grease Monkey, just not worth risking a 0day exploit due to a malicious or badly written script. So, my advice, avoid GreaseMonkey unless you can review the code yourself and ensure there’s nothing that could be used to compromise security. Social engineering using simple sites like this is and other “official” forums and comments sections is extremely common. I’m sure the author of this script doesn’t have any bad intentions and wants as many people as he can to use this script. But, now that it’s two and a half years without an update I would be very VERY sceptical of using this script now-a-days.

    Comment by DATmafia — March 11, 2010 @ 2:08 am

  7. DATmafia, thanks for the comments on this old post. I wrote the script and it is still one of the first things that I install when setting up a new Firefox install.
    Everyone should take caution when using the web.

    Comment by admin — March 11, 2010 @ 2:49 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment