Created
August 13, 2014 07:56
-
-
Save isayme/aba8b5cb08423a5b2fd9 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 noGoogleRedirect | |
// @namespace http://www.onefloweroneworld.com | |
// @description 禁止点击Google搜索结果的跳转. | |
// @include http://www.google.com/search?* | |
// @include https://www.google.com/search?* | |
// @version 0.1 | |
// @author iSayme <[email protected]> | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
var removeMouseDown = function() { | |
var items = document.querySelectorAll('li.g h3.r a'); | |
for(var i = 0, l = items.length; i < l; i++) { | |
items[i].removeAttribute('onmousedown'); | |
} | |
} | |
var s = document.createElement('script'); | |
s.setAttribute('type', 'text/javascript'); | |
s.appendChild(document.createTextNode('(' + removeMouseDown + ')()')); | |
document.getElementsByTagName('head')[0].appendChild(s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment