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 class="small-description">__MSG_skipNoticeDurationDescription__</div>
|
||||||
</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-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">
|
<div class="switch-container">
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="dontShowNotice" type="checkbox" checked>
|
<input id="dontShowNotice" type="checkbox" checked>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ interface SBConfig {
|
|||||||
trackDownvotes: boolean;
|
trackDownvotes: boolean;
|
||||||
trackDownvotesInPrivate: boolean;
|
trackDownvotesInPrivate: boolean;
|
||||||
dontShowNotice: boolean;
|
dontShowNotice: boolean;
|
||||||
dontShowUpcomingNotice: boolean;
|
showUpcomingNotice: boolean;
|
||||||
noticeVisibilityMode: NoticeVisbilityMode;
|
noticeVisibilityMode: NoticeVisbilityMode;
|
||||||
hideVideoPlayerControls: boolean;
|
hideVideoPlayerControls: boolean;
|
||||||
hideInfoButtonPlayerControls: boolean;
|
hideInfoButtonPlayerControls: boolean;
|
||||||
@@ -294,7 +294,7 @@ const syncDefaults = {
|
|||||||
trackDownvotes: true,
|
trackDownvotes: true,
|
||||||
trackDownvotesInPrivate: false,
|
trackDownvotesInPrivate: false,
|
||||||
dontShowNotice: false,
|
dontShowNotice: false,
|
||||||
dontShowUpcomingNotice: false,
|
showUpcomingNotice: false,
|
||||||
noticeVisibilityMode: NoticeVisbilityMode.FadedForAutoSkip,
|
noticeVisibilityMode: NoticeVisbilityMode.FadedForAutoSkip,
|
||||||
hideVideoPlayerControls: false,
|
hideVideoPlayerControls: false,
|
||||||
hideInfoButtonPlayerControls: false,
|
hideInfoButtonPlayerControls: false,
|
||||||
|
|||||||
@@ -799,7 +799,7 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current
|
|||||||
currentSkipSchedule = setTimeout(skippingFunction, offsetDelayTime);
|
currentSkipSchedule = setTimeout(skippingFunction, offsetDelayTime);
|
||||||
|
|
||||||
// Show the notice only if the segment hasn't already started
|
// 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 maxPopupTime = 3000;
|
||||||
const timeUntilPopup = Math.max(0, offsetDelayTime - maxPopupTime);
|
const timeUntilPopup = Math.max(0, offsetDelayTime - maxPopupTime);
|
||||||
const popupTime = offsetDelayTime - timeUntilPopup;
|
const popupTime = offsetDelayTime - timeUntilPopup;
|
||||||
|
|||||||
Reference in New Issue
Block a user