mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Merge pull request #1168 from mchangrh/youtubeClip
early return if url is youtube clips url
This commit is contained in:
@@ -919,6 +919,8 @@ async function getVideoInfo(): Promise<void> {
|
|||||||
|
|
||||||
function getYouTubeVideoID(document: Document): string | boolean {
|
function getYouTubeVideoID(document: Document): string | boolean {
|
||||||
const url = document.URL;
|
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
|
// 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);
|
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/
|
// skip to document and don't hide if on /embed/
|
||||||
|
|||||||
Reference in New Issue
Block a user