mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Change upcoming notice default
This commit is contained in:
@@ -209,19 +209,21 @@
|
||||
<div class="small-description">__MSG_skipNoticeDurationDescription__</div>
|
||||
</div>
|
||||
|
||||
<div data-type="toggle" data-toggle-type="reverse" data-sync="dontShowUpcomingNotice">
|
||||
<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="dontShowUpcomingNotice" type="checkbox" checked>
|
||||
<input id="showUpcomingNotice" type="checkbox" checked>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label class="switch-label" for="dontShowUpcomingNotice">
|
||||
<label class="switch-label" for="showUpcomingNotice">
|
||||
__MSG_showUpcomingNotice__
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-type="toggle" data-toggle-type="reverse" data-sync="dontShowNotice">
|
||||
<br/>
|
||||
|
||||
<div class="switch-container">
|
||||
<label class="switch">
|
||||
<input id="dontShowNotice" type="checkbox" checked>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user