Fixed youtube script
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user