Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Update userscript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
xacnio authored and VictorWesterlund committed Jun 18, 2022
1 parent f99e920 commit 4f822b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 4f822b2

Please sign in to comment.