Created
May 23, 2014 03:53
-
-
Save solos/8d75ee9c6971e65daca5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 去掉Google搜索跳转 | |
// @namespace Google | |
// @include https://www.google.co* | |
// @include http://www.google.co* | |
// @grant GM_setValue | |
// @version 1 | |
// ==/UserScript== | |
document.addEventListener('DOMNodeInserted', checksearch, false); | |
function checksearch() { | |
var list = document.getElementById('ires'); | |
if (list) { | |
document.removeEventListener('DOMNodeInserted', checksearch, false); | |
document.addEventListener('DOMNodeInserted', clear, false) | |
}; | |
} | |
function clear() { | |
var items = document.querySelectorAll('a[onmousedown]'); | |
for (var i = 0; i < items.length; i++) { | |
items[i].removeAttribute('onmousedown'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment