mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 14:07:13 +03:00
@@ -31,7 +31,6 @@ let sponsorVideoID: VideoID = null;
|
|||||||
// List of open skip notices
|
// List of open skip notices
|
||||||
const skipNotices: SkipNotice[] = [];
|
const skipNotices: SkipNotice[] = [];
|
||||||
let activeSkipKeybindElement: ToggleSkippable = null;
|
let activeSkipKeybindElement: ToggleSkippable = null;
|
||||||
let lastPOISkip = 0;
|
|
||||||
|
|
||||||
// JSON video info
|
// JSON video info
|
||||||
let videoInfo: VideoInfo = null;
|
let videoInfo: VideoInfo = null;
|
||||||
@@ -612,24 +611,6 @@ function setupVideoListeners() {
|
|||||||
|
|
||||||
startSponsorSchedule();
|
startSponsorSchedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Config.config.dontShowNotice) {
|
|
||||||
const currentPoiSegment = sponsorTimes?.find((segment) =>
|
|
||||||
getCategoryActionType(segment.category) === CategoryActionType.POI &&
|
|
||||||
video.currentTime - segment.segment[0] > 0 &&
|
|
||||||
video.currentTime - segment.segment[0] < previewBar.getMinimumSize(true));
|
|
||||||
if (currentPoiSegment && lastPOISkip < Date.now() - 3000
|
|
||||||
&& !skipNotices.some((notice) => notice.segments.some((s) => s.UUID === currentPoiSegment.UUID))) {
|
|
||||||
lastPOISkip = Date.now();
|
|
||||||
skipToTime({
|
|
||||||
v: video,
|
|
||||||
skipTime: currentPoiSegment.segment,
|
|
||||||
skippingSegments: [currentPoiSegment],
|
|
||||||
openNotice: true,
|
|
||||||
forceAutoSkip: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
video.addEventListener('ratechange', () => startSponsorSchedule());
|
video.addEventListener('ratechange', () => startSponsorSchedule());
|
||||||
// Used by videospeed extension (https://github.com/igrigorik/videospeed/pull/740)
|
// Used by videospeed extension (https://github.com/igrigorik/videospeed/pull/740)
|
||||||
|
|||||||
Reference in New Issue
Block a user