diff options
author | Ajay Ramachandran <[email protected]> | 2022-02-06 13:22:52 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-02-06 13:22:52 -0500 |
commit | f5301fc374e698a8e3b0f98fa348af1c2ceff934 (patch) | |
tree | 0fa07592dd26d0540e74979f8c9b6000936aa3bd | |
parent | 159e7598d7450b01880866ff3d63dd521a04f1dd (diff) | |
parent | 48124e56d62c11d014b0227a55685401780d586b (diff) | |
download | SponsorBlock-f5301fc374e698a8e3b0f98fa348af1c2ceff934.tar.gz SponsorBlock-f5301fc374e698a8e3b0f98fa348af1c2ceff934.zip |
Merge pull request #1168 from mchangrh/youtubeClip
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 0fc8e462..b1c785c6 100644 --- a/src/content.ts +++ b/src/content.ts @@ -919,6 +919,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/ |