Last active
December 19, 2015 00:09
-
-
Save ETiV/5866623 to your computer and use it in GitHub Desktop.
去掉 Google 搜索结果页的跳转
This file contains 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 ETiV | |
// @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(){ | |
//console.log('remove action:',++count2); | |
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