Fixed incorrect videoID check being in reverse.

This commit is contained in:
Ajay Ramachandran
2020-04-24 21:28:08 -04:00
parent 4131442066
commit 0b90539372

View File

@@ -517,7 +517,7 @@ function startSponsorSchedule(includeIntersectingSegments: boolean = false, curr
*/ */
function incorrectVideoIDCheck(): boolean { function incorrectVideoIDCheck(): boolean {
let currentVideoID = getYouTubeVideoID(document.URL); let currentVideoID = getYouTubeVideoID(document.URL);
if (currentVideoID == sponsorVideoID) { if (currentVideoID !== sponsorVideoID) {
// Something has really gone wrong // 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] The videoID recorded when trying to skip is different than what it should be.");
console.error("[SponsorBlock] VideoID recorded: " + sponsorVideoID + ". Actual VideoID: " + currentVideoID); console.error("[SponsorBlock] VideoID recorded: " + sponsorVideoID + ". Actual VideoID: " + currentVideoID);
@@ -525,9 +525,9 @@ function incorrectVideoIDCheck(): boolean {
// Video ID change occured // Video ID change occured
videoIDChange(currentVideoID); videoIDChange(currentVideoID);
return false;
} else {
return true; return true;
} else {
return false;
} }
} }