From 4f822b2a69bb3b620d3763b8006819befa4de44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alperen=20=C3=87etin?= Date: Thu, 16 Jun 2022 17:28:45 +0300 Subject: [PATCH] Update userscript.js --- userscript.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/userscript.js b/userscript.js index f2debd2..71fa51a 100644 --- a/userscript.js +++ b/userscript.js @@ -58,7 +58,8 @@ // Poll document tree until video element is loaded const init = (mutations, observer) => { clearTimeout(timeout); - if(!window.location.href.includes("/video/")) { + const pattern = /^\/?([A-Za-z-]*)?\/video\//i; + if(!pattern.test(window.location.pathname)) { return false; } if(document.getElementsByTagName("video")[0]) {