Created
April 26, 2019 08:56
-
-
Save Sciss/4ec77e0f3a85a4e4d309efcf30669a9b 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 Disable ctrl-F keyboard hijacking | |
// @description Stop websites from highjacking keyboard shortcuts | |
// | |
// @run-at document-start | |
// @include * | |
// @grant none | |
// ==/UserScript== | |
document.addEventListener('keydown', function(e) { | |
// alert(e.keyCode); //uncomment to find out the keycode for any given key | |
if (e.ctrlKey && (e.keyCode == 70)) | |
{ | |
e.cancelBubble = true; | |
e.stopImmediatePropagation(); | |
} | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment