Skip to content

Instantly share code, notes, and snippets.

@troelsselch
Last active October 24, 2015 12:38
Show Gist options
  • Save troelsselch/132f539c89a255f2abe8 to your computer and use it in GitHub Desktop.
Save troelsselch/132f539c89a255f2abe8 to your computer and use it in GitHub Desktop.
Stop google key hijacking
// ==UserScript==
// @name Google stop focus
// @description Stop google from focusing the search input on every key press. Compatible with Firefox, Chrome, and Opera.
//
// @run-at document-start
// @include http://*.google.*
// @include https://*.google.*
// Source http://userscripts-mirror.org/scripts/review/132237
// ==/UserScript==
(window.opera ? document.body : document).addEventListener('keydown', function(e) {
e.cancelBubble = true;
e.stopImmediatePropagation();
return false;
}, !window.opera);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment