您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Stop websites from highjacking keyboard shortcuts
当前为
// ==UserScript== // @name Disable keyboard shortcuts // @description Stop websites from highjacking keyboard shortcuts // // @run-at document-start // @include * // @grant none // @version 0.0.1.20180207065400 // @namespace https://greasyfork.org/users/30 // ==/UserScript== var keycodes = [191,111] // Keycode for '/', add more keycodes to disable other key captures document.addEventListener('keydown', function(e) { // alert(e.keyCode); //uncomment to find out the keycode for any given key if (keycodes.indexOf(e.keyCode) != -1) { e.cancelBubble = true; e.stopPropagation(); e.stopImmediatePropagation(); return false; } });