diff options
author | Michael C <[email protected]> | 2022-02-06 01:05:19 -0500 |
---|---|---|
committer | Michael C <[email protected]> | 2022-02-06 01:05:19 -0500 |
commit | 48124e56d62c11d014b0227a55685401780d586b (patch) | |
tree | 393f8ad9afbd991a873cae54520e0d2af327d441 | |
parent | e8307a2af7af23a55351c096bb40cb382308da80 (diff) | |
download | SponsorBlock-48124e56d62c11d014b0227a55685401780d586b.tar.gz SponsorBlock-48124e56d62c11d014b0227a55685401780d586b.zip |
early return if url is youtube clips url
-rw-r--r-- | src/content.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/content.ts b/src/content.ts index 9952a9dd..87dc0dbe 100644 --- a/src/content.ts +++ b/src/content.ts @@ -918,6 +918,8 @@ async function getVideoInfo(): Promise<void> { function getYouTubeVideoID(document: Document): string | boolean { const url = document.URL; + // clips should never skip, going from clip to full video has no indications. + if (url.includes("youtube.com/clip/")) return false; // skip to URL if matches youtube watch or invidious or matches youtube pattern if ((!url.includes("youtube.com")) || url.includes("/watch") || url.includes("/shorts/") || url.includes("playlist")) return getYouTubeVideoIDFromURL(url); // skip to document and don't hide if on /embed/ |