| 28462 | }); |
| 28463 | |
| 28464 | function initKeyInputs() { |
| 28465 | if (!GM_config.frame || !GM_config.frame.contentDocument) return; |
| 28466 | let keyInputs = GM_config.frame.contentDocument.querySelectorAll('input.floatBar-key'); |
| 28467 | [].forEach.call(keyInputs, input => { |
| 28468 | input.setAttribute('readOnly', 'readonly'); |
| 28469 | input.addEventListener("keydown", e => { |
| 28470 | if (e.key === 'Escape' || e.key === 'Backspace') input.value = ''; |
| 28471 | else input.value = e.key; |
| 28472 | e.stopPropagation(); |
| 28473 | e.preventDefault(); |
| 28474 | }); |
| 28475 | }); |
| 28476 | } |
| 28477 | |
| 28478 | matchedRule = getMatchedRule(); |
| 28479 | let editUrl=storage.getItem("editUrl"); |