mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Improved zero second skipping for directly loaded videos
This commit is contained in:
@@ -259,8 +259,13 @@ function resetValues() {
|
||||
//reset sponsor data found check
|
||||
sponsorDataFound = false;
|
||||
|
||||
if (switchingVideos === null) {
|
||||
// When first loading a video, it is not switching videos
|
||||
switchingVideos = false;
|
||||
} else {
|
||||
switchingVideos = true;
|
||||
}
|
||||
}
|
||||
|
||||
async function videoIDChange(id) {
|
||||
//if the id has not changed return
|
||||
@@ -588,7 +593,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
||||
UUIDs = smallUUIDs;
|
||||
}
|
||||
|
||||
if (!video.paused && !switchingVideos) {
|
||||
if (!switchingVideos) {
|
||||
// See if there are any starting sponsors
|
||||
let startingSponsor: number = -1;
|
||||
for (const time of sponsorTimes) {
|
||||
|
||||
Reference in New Issue
Block a user