Update userscript.js

This commit is contained in:
Alperen Çetin 2022-06-16 17:28:45 +03:00 committed by GitHub
parent f99e92037c
commit 559719f9b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]) {