Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Google link cleaner
@joedf

This comment has been minimized.

Copy link

@joedf 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