mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
set isInvidious to bypass UI bugs
This commit is contained in:
@@ -905,7 +905,12 @@ function getYouTubeVideoID(document: Document): string | boolean {
|
||||
function getYouTubeVideoIDFromDocument(document: Document): string | boolean {
|
||||
// get ID from document (channel trailer)
|
||||
const videoURL = document.querySelector("[data-sessionlink='feature=player-title']")?.getAttribute("href");
|
||||
return getYouTubeVideoIDFromURL(videoURL);
|
||||
if (videoURL) {
|
||||
onInvidious = true;
|
||||
return getYouTubeVideoIDFromURL(videoURL);
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function getYouTubeVideoIDFromURL(url: string): string | boolean {
|
||||
|
||||
Reference in New Issue
Block a user