mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-29 13:50:50 +03:00
Improved zero second skipping for directly loaded videos
This commit is contained in:
@@ -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,7 +593,7 @@ 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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user