Last active
March 25, 2016 23:09
-
-
Save michaelmob/26fbdb110b72327357b2 to your computer and use it in GitHub Desktop.
Removes Google's Click Hijacking from search results.
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 Click Hijacking Killer | |
// @version 1 | |
// @namespace GCHK | |
// @description Remove Google's Click Hijacking | |
// @include http://www.google.com/search* | |
// @include https://www.google.com/search* | |
// @grant none | |
// ==/UserScript== | |
function removeHijack(e) { | |
for (var i = e.length - 1; i >= 0; i--) | |
e[i].childNodes[0].removeAttribute("onmousedown"); | |
}; | |
/*function onStyleChange(e, fx) { | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(fx); | |
}).observe(e, { attributes : true, attributeFilter : ["style"] }); | |
};*/ | |
window.onload = function() { | |
removeHijack(document.getElementsByClassName("r")); | |
/*onStyleChange(document.getElementById("irc_cc"), function() { | |
// Remove Image View Clickjacking | |
});*/ | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment