mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "__MSG_Name__",
|
"short_name": "__MSG_Name__",
|
||||||
"version": "1.2.22",
|
"version": "1.2.23",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"content_scripts": [{
|
"content_scripts": [{
|
||||||
|
|||||||
@@ -259,7 +259,12 @@ function resetValues() {
|
|||||||
//reset sponsor data found check
|
//reset sponsor data found check
|
||||||
sponsorDataFound = false;
|
sponsorDataFound = false;
|
||||||
|
|
||||||
switchingVideos = true;
|
if (switchingVideos === null) {
|
||||||
|
// When first loading a video, it is not switching videos
|
||||||
|
switchingVideos = false;
|
||||||
|
} else {
|
||||||
|
switchingVideos = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function videoIDChange(id) {
|
async function videoIDChange(id) {
|
||||||
@@ -588,18 +593,18 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
|||||||
UUIDs = smallUUIDs;
|
UUIDs = smallUUIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!video.paused && !switchingVideos) {
|
if (!switchingVideos) {
|
||||||
// See if there are any starting sponsors
|
// See if there are any starting sponsors
|
||||||
let startingSponsor: number = -1;
|
let startingSponsor: number = -1;
|
||||||
for (const time of sponsorTimes) {
|
for (const time of sponsorTimes) {
|
||||||
if (time[0] <= video.currentTime && time[0] > startingSponsor) {
|
if (time[0] <= video.currentTime && time[0] > startingSponsor && time[1] > video.currentTime) {
|
||||||
startingSponsor = time[0];
|
startingSponsor = time[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!startingSponsor) {
|
if (!startingSponsor) {
|
||||||
for (const time of sponsorTimesSubmitting) {
|
for (const time of sponsorTimesSubmitting) {
|
||||||
if (time[0] <= video.currentTime && time[0] > startingSponsor) {
|
if (time[0] <= video.currentTime && time[0] > startingSponsor && time[1] > video.currentTime) {
|
||||||
startingSponsor = time[0];
|
startingSponsor = time[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -607,7 +612,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (startingSponsor !== -1) {
|
if (startingSponsor !== -1) {
|
||||||
startSponsorSchedule(0);
|
startSponsorSchedule(startingSponsor);
|
||||||
} else {
|
} else {
|
||||||
startSponsorSchedule();
|
startSponsorSchedule();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user