Fixed youtube script

This commit is contained in:
stabosa87
2026-05-19 19:28:19 -05:00
parent 71221d8f06
commit bcab3a923c
+7 -6
View File
@@ -1,8 +1,9 @@
// ==UserScript== // ==UserScript==
// @name No youtube numpad // @name No youtube numpad
// @match https://www.youtube.com/watch* // @match https://www.youtube.com/*
// @author Stabosa87 // @author Stabosa87
// @grant none // @grant none
// @run-at document-start
// ==/UserScript== // ==/UserScript==
(function () { (function () {
@@ -19,10 +20,11 @@
if (!el) return false; if (!el) return false;
const tag = el.tagName; const tag = el.tagName;
if (tag === 'INPUT' || tag === 'TEXTAREA') return true; return (
if (el.isContentEditable) return true; tag === 'INPUT' ||
tag === 'TEXTAREA' ||
return false; el.isContentEditable
);
} }
function handler(e) { function handler(e) {
@@ -30,7 +32,6 @@
if (typing(document.activeElement)) return; if (typing(document.activeElement)) return;
e.preventDefault(); e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation(); e.stopImmediatePropagation();
} }