Backspace History

Makes the backspace key go back in history instead of modifying the search string

  1. // ==UserScript==
  2. // @name Backspace History
  3. // @namespace https://github.com/chriskim06/userscripts
  4. // @description Makes the backspace key go back in history instead of modifying the search string
  5. // @match https://www.google.com/*
  6. // @version 1.8
  7. // ==/UserScript==
  8.  
  9. document.querySelector('html').addEventListener('keydown', function(e) {
  10. if (!e.shiftKey && e.which === 8 && e.target.nodeName !== 'INPUT') {
  11. e.preventDefault();
  12. e.stopImmediatePropagation();
  13. window.history.back();
  14. return false;
  15. }
  16. });

QingJ © 2025

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