Skip to content

Instantly share code, notes, and snippets.

@bennettmcelwee
Created December 4, 2012 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennettmcelwee/4200460 to your computer and use it in GitHub Desktop.
Save bennettmcelwee/4200460 to your computer and use it in GitHub Desktop.
Google link cleaner
@joedf
Copy link

joedf commented Jul 28, 2020

this works well, based on https://stackoverflow.com/a/43037561/883015

// ==UserScript==
// @name           Google link cleaner
// @description    Make Google SERPs links go straight to their target, not via Google
// @include        *://www.google.*/*
// ==/UserScript==

window.addEventListener('mousedown', event => {
    const a = event.target.closest('a');
    if (a) {
        a.onmousedown = null;
    }
}, true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment