diff options
author | Ajay Ramachandran <[email protected]> | 2021-10-30 22:02:21 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-10-30 22:02:21 -0400 |
commit | 36989907a210ff9fe6444fa781e2b86337a60a08 (patch) | |
tree | 21f3379d244079040509320e3441b06e47dcaec8 /src/content.ts | |
parent | e87efe2c6736efd51a7984ce2020993051909d50 (diff) | |
download | SponsorBlock-36989907a210ff9fe6444fa781e2b86337a60a08.tar.gz SponsorBlock-36989907a210ff9fe6444fa781e2b86337a60a08.zip |
Remove highlight skipping by clicking near it
Closes #973
Diffstat (limited to 'src/content.ts')
-rw-r--r-- | src/content.ts | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/content.ts b/src/content.ts index 24267ec6..83a170b8 100644 --- a/src/content.ts +++ b/src/content.ts @@ -31,7 +31,6 @@ let sponsorVideoID: VideoID = null; // List of open skip notices const skipNotices: SkipNotice[] = []; let activeSkipKeybindElement: ToggleSkippable = null; -let lastPOISkip = 0; // JSON video info let videoInfo: VideoInfo = null; @@ -612,24 +611,6 @@ function setupVideoListeners() { 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()); // Used by videospeed extension (https://github.com/igrigorik/videospeed/pull/740) |