Skip to content

Instantly share code, notes, and snippets.

@Milly
Forked from technicool/googlecleaner.user.js
Last active September 2, 2018 17:45
Show Gist options
  • Save Milly/b35f7ef228abcf0b92f9 to your computer and use it in GitHub Desktop.
Save Milly/b35f7ef228abcf0b92f9 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Clean Google links
// @namespace http://d.hatena.ne.jp/MillyC/
// @description clean links in Google search result page (remove "onmousedown" attribute).
// @include http://www.google.com/search?*
// @include https://www.google.com/search?*
// @include http://www.google.co.*/search?*
// @include https://www.google.co.*/search?*
// @grant none
// ==/UserScript==
document.body.addEventListener('mousedown', function(event){
var el = event.target;
if (el && el.tagName == 'A') {
el.removeAttribute('onmousedown');
}
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment