diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 61ed0512..4088e090 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -463,6 +463,12 @@ "minDurationDescription": { "message": "Segments shorter than the set value will not be skipped or show in the player." }, + "enableManualSkipOnFullVideo": { + "message": "Use manual skip when a full video label exists" + }, + "whatManualSkipOnFullVideo": { + "message": "For people who want to watch the video uninteruppted if it is fully sponsored or self promotion." + }, "skipNoticeDuration": { "message": "Skip notice duration (seconds):" }, diff --git a/public/options/options.html b/public/options/options.html index fa23687a..31a60cb1 100644 --- a/public/options/options.html +++ b/public/options/options.html @@ -98,6 +98,20 @@
__MSG_minDurationDescription__
+ +
+
+ + +
+ +
__MSG_whatManualSkipOnFullVideo__
+
diff --git a/src/config.ts b/src/config.ts index 2fc48814..51f3c09d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -25,6 +25,7 @@ interface SBConfig { disableSkipping: boolean, muteSegments: boolean, fullVideoSegments: boolean, + manualSkipOnFullVideo: boolean, trackViewCount: boolean, trackViewCountInPrivate: boolean, trackDownvotes: boolean, @@ -159,6 +160,7 @@ const Config: SBObject = { disableSkipping: false, muteSegments: true, fullVideoSegments: true, + manualSkipOnFullVideo: false, trackViewCount: true, trackViewCountInPrivate: true, trackDownvotes: true, diff --git a/src/content.ts b/src/content.ts index e143aa28..d9b3646b 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1690,9 +1690,10 @@ function createButton(baseID: string, title: string, callback: () => void, image } function shouldAutoSkip(segment: SponsorTime): boolean { - return utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip || + return (!Config.config.manualSkipOnFullVideo || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full)) + && (utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip || (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic") - && segment.actionType !== ActionType.Poi); + && segment.actionType !== ActionType.Poi)); } function shouldSkip(segment: SponsorTime): boolean {