From 48124e56d62c11d014b0227a55685401780d586b Mon Sep 17 00:00:00 2001 From: Michael C Date: Sun, 6 Feb 2022 01:05:19 -0500 Subject: [PATCH] early return if url is youtube clips url --- src/content.ts | 2 ++ 1 file changed, 2 insertions(+) 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 { 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/