Skip to content

Instantly share code, notes, and snippets.

@mvoelk
Created January 19, 2018 19:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvoelk/4f41b031f7c7e06f33aa4fd46f8d8351 to your computer and use it in GitHub Desktop.
Save mvoelk/4f41b031f7c7e06f33aa4fd46f8d8351 to your computer and use it in GitHub Desktop.
Userscript - Remove redirection from google links
// ==UserScript==
// @name Google Redirect Remover
// @namespace Google Redirect Remover
// @description Stop google links from using their tracking redirect
// @version 1.0.0
// @include https://*.google.com/*
// @include https://*.google.de/*
// ==/UserScript==
for (i = 0; i < document.links.length; i++) {
void(document.links[i].href = unescape(document.links[i].href));
void(document.links[i].href = document.links[i].href.replace(/^http.*(http[^&%]*).*/, '$1'));
void(document.links[i].onmousedown = null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment