🏠 Home 

禁用F1帮助窗口

chrome、edge等浏览器中F1会弹出帮助窗口,经常会误触,故禁用所有页面中的F1快捷键


安装此脚本?
  1. // ==UserScript==
  2. // @name 禁用F1帮助窗口
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description chrome、edge等浏览器中F1会弹出帮助窗口,经常会误触,故禁用所有页面中的F1快捷键
  6. // @author forcier
  7. // @match *://*/*
  8. // @license MIT
  9. // @run-at document-start
  10. // @grant none
  11. // ==/UserScript==
  12. (function () {
  13. "use strict";
  14. document.addEventListener("keydown", function (e) {
  15. "F1" == e.key && e.preventDefault();
  16. });
  17. })();