User:Rearguard75th abandoned/scripts/sToSearch.js

document.addEventListener("keydown", evt => { let s = document.getElementById("searchInput");  if (document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA") {    return; // abort; an input element already focussed  }  // check if 's' was pressed and focus  evt = evt || window.event;  if (evt.ctrlKey === false && evt.keyCode === 83) {    s.focus;    // avoid 's' being then typed into the input    evt.preventDefault;  } });