Prevent Slash Opening QuickFind

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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.2
// @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" || key.target.nodeName == "SELECT") return;
  if (key.target.hasAttribute("contenteditable") && key.target.getAttribute("contenteditable") == "true") return;
  if (key.ctrlKey || key.shiftKey || key.altKey || key.metaKey) return;
  // codes for / and ' key on my Windows 7, your keyCode may vary?
  if (key.which == 191 || key.which == 222){
    key.stopPropagation();
    key.preventDefault();
    return false;
  }
}
document.onkeydown = PSOQ_KeyCheck;