Update userscript.js

This commit is contained in:
Alperen Çetin 2022-06-16 17:28:45 +03:00 committed by Victor Westerlund
parent f99e92037c
commit 4f822b2a69

View file

@ -58,7 +58,8 @@
// Poll document tree until video element is loaded // Poll document tree until video element is loaded
const init = (mutations, observer) => { const init = (mutations, observer) => {
clearTimeout(timeout); clearTimeout(timeout);
if(!window.location.href.includes("/video/")) { const pattern = /^\/?([A-Za-z-]*)?\/video\//i;
if(!pattern.test(window.location.pathname)) {
return false; return false;
} }
if(document.getElementsByTagName("video")[0]) { if(document.getElementsByTagName("video")[0]) {