Backspace Means Backspace

Prevents Back action on Backspace key

  1. // ==UserScript==
  2. // @name Backspace Means Backspace
  3. // @namespace https://github.com/infofarmer
  4. // @version 0.1.1
  5. // @description Prevents Back action on Backspace key
  6. // @include *
  7. // @run-at document-start
  8. // @copyright 2014+, nollegcraft/playswithlife
  9. // ==/UserScript==
  10.  
  11. window.addEventListener('keydown', function(e) {
  12. if (e.keyIdentifier == 'U+0008' || e.keyIdentifier == 'Backspace') {
  13. if (e.target == document.body) {
  14. e.preventDefault();
  15. }
  16. }
  17. }, true);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址