diff options
author | Michael C <[email protected]> | 2022-04-08 22:03:00 -0400 |
---|---|---|
committer | Michael C <[email protected]> | 2022-04-08 22:03:00 -0400 |
commit | 88f60c0e84394dbf8516f9fc7ca46542c698a532 (patch) | |
tree | b61b7d142fe94899632c29ab47bbb92f0d7edc61 | |
parent | 0d31b8276c0b439b866bae1207a8ba8e3323113e (diff) | |
download | SponsorBlock-88f60c0e84394dbf8516f9fc7ca46542c698a532.tar.gz SponsorBlock-88f60c0e84394dbf8516f9fc7ca46542c698a532.zip |
close #1265
-rw-r--r-- | src/content.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts index 2212945b..49c57372 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1003,10 +1003,10 @@ 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 document and don't hide if on /embed/ + if (url.includes("/embed/") && url.includes("youtube.com")) return getYouTubeVideoIDFromDocument(document, 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/ - if (url.includes("/embed/")) return getYouTubeVideoIDFromDocument(document, false); // skip to document if matches pattern if (url.includes("/channel/") || url.includes("/user/") || url.includes("/c/")) return getYouTubeVideoIDFromDocument(document); // not sure, try URL then document |