Prevent Slash Opening QuickFind

When the / key is received outside a text entry field, discard it

目前为 2015-10-31 提交的版本。查看 最新版本

// ==UserScript==
// @name        Prevent Slash Opening QuickFind
// @author      Jefferson "jscher2000" Scher
// @namespace   JeffersonScher
// @description When the / key is received outside a text entry field, discard it
// @include     *
// @version     0.9
// @grant       none
// @copyright   Copyright 2015 Jefferson Scher
// @license     BSD 3-clause
// ==/UserScript==

function PSOQ_KeyCheck(key){
  if (key.target.nodeName == "INPUT" || key.target.nodeName == "TEXTAREA") return;
  if (key.which == 191){ // code for / key on my Windows 7, your keyCode may vary?
    key.stopPropagation();
    key.preventDefault();
    return false;
  }
}
document.onkeydown = PSOQ_KeyCheck;

QingJ © 2025

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