From bb670b93e9cd2d5a8aaff29925721b3eaf0a9f6f Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 16 May 2020 23:39:04 -0400 Subject: [PATCH] Fix preview sponsors not skipping --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 6cb7a7ad..245a61b8 100644 --- a/src/content.ts +++ b/src/content.ts @@ -519,7 +519,7 @@ function startSponsorSchedule(includeIntersectingSegments: boolean = false, curr */ function incorrectVideoCheck(videoID?: string, sponsorTime?: SponsorTime): boolean { let currentVideoID = getYouTubeVideoID(document.URL); - if (currentVideoID !== (videoID || sponsorVideoID) || (sponsorTime && !sponsorTimes.includes(sponsorTime))) { + if (currentVideoID !== (videoID || sponsorVideoID) || (sponsorTime && (!sponsorTimes || !sponsorTimes.includes(sponsorTime)) && !sponsorTimesSubmitting.includes(sponsorTime))) { // Something has really gone wrong console.error("[SponsorBlock] The videoID recorded when trying to skip is different than what it should be."); console.error("[SponsorBlock] VideoID recorded: " + sponsorVideoID + ". Actual VideoID: " + currentVideoID);