diff options
author | Ajay <[email protected]> | 2024-09-03 20:04:33 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2024-09-03 20:04:33 -0400 |
commit | dfdc052f4bcd0f4d2f50a37ef4763e3a1af5024d (patch) | |
tree | 479de21ee8b6eb66ed444f17d4a203559e40ab50 | |
parent | 7ca3b699657cf46ccf27e4e9a9a19bd84dcdfa9b (diff) | |
download | SponsorBlock-dfdc052f4bcd0f4d2f50a37ef4763e3a1af5024d.tar.gz SponsorBlock-dfdc052f4bcd0f4d2f50a37ef4763e3a1af5024d.zip |
Change upcoming notice default
-rw-r--r-- | public/options/options.html | 26 | ||||
-rw-r--r-- | src/config.ts | 4 | ||||
-rw-r--r-- | src/content.ts | 2 |
3 files changed, 17 insertions, 15 deletions
diff --git a/public/options/options.html b/public/options/options.html index e63b9837..2a19599c 100644 --- a/public/options/options.html +++ b/public/options/options.html @@ -209,19 +209,21 @@ <div class="small-description">__MSG_skipNoticeDurationDescription__</div> </div> - <div data-type="toggle" data-toggle-type="reverse" data-sync="dontShowUpcomingNotice"> - <div class="switch-container"> - <label class="switch"> - <input id="dontShowUpcomingNotice" type="checkbox" checked> - <span class="slider round"></span> - </label> - <label class="switch-label" for="dontShowUpcomingNotice"> - __MSG_showUpcomingNotice__ - </label> - </div> - </div> - <div data-type="toggle" data-toggle-type="reverse" data-sync="dontShowNotice"> + <div data-type="toggle" data-sync="showUpcomingNotice"> + <div class="switch-container"> + <label class="switch"> + <input id="showUpcomingNotice" type="checkbox" checked> + <span class="slider round"></span> + </label> + <label class="switch-label" for="showUpcomingNotice"> + __MSG_showUpcomingNotice__ + </label> + </div> + </div> + + <br/> + <div class="switch-container"> <label class="switch"> <input id="dontShowNotice" type="checkbox" checked> diff --git a/src/config.ts b/src/config.ts index 0aff6355..7ce24123 100644 --- a/src/config.ts +++ b/src/config.ts @@ -31,7 +31,7 @@ interface SBConfig { trackDownvotes: boolean; trackDownvotesInPrivate: boolean; dontShowNotice: boolean; - dontShowUpcomingNotice: boolean; + showUpcomingNotice: boolean; noticeVisibilityMode: NoticeVisbilityMode; hideVideoPlayerControls: boolean; hideInfoButtonPlayerControls: boolean; @@ -294,7 +294,7 @@ const syncDefaults = { trackDownvotes: true, trackDownvotesInPrivate: false, dontShowNotice: false, - dontShowUpcomingNotice: false, + showUpcomingNotice: false, noticeVisibilityMode: NoticeVisbilityMode.FadedForAutoSkip, hideVideoPlayerControls: false, hideInfoButtonPlayerControls: false, diff --git a/src/content.ts b/src/content.ts index 3fc59cdf..db60e7b9 100644 --- a/src/content.ts +++ b/src/content.ts @@ -799,7 +799,7 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current currentSkipSchedule = setTimeout(skippingFunction, offsetDelayTime); // Show the notice only if the segment hasn't already started - if (!Config.config.dontShowUpcomingNotice && getCurrentTime() < skippingSegments[0].segment[0]) { + if (Config.config.showUpcomingNotice && getCurrentTime() < skippingSegments[0].segment[0]) { const maxPopupTime = 3000; const timeUntilPopup = Math.max(0, offsetDelayTime - maxPopupTime); const popupTime = offsetDelayTime - timeUntilPopup; |