diff --git a/manifest/manifest.json b/manifest/manifest.json index fcfd4bc0..b02fe4ca 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -32,6 +32,7 @@ "icons/downvote.png", "icons/report.png", "icons/close.png", + "icons/beep.ogg", "icons/PlayerInfoIconSponsorBlocker256px.png", "icons/PlayerDeleteIconSponsorBlocker256px.png", "popup.html", diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 51ff42cb..5809054f 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -291,6 +291,12 @@ "autoSkipDescription": { "message": "Auto skip will skip sponsors for you. If disabled, a notice will appear asking if you'd like to skip." }, + "audioNotification": { + "message": "Audio Notification On Skip" + }, + "audioNotificationDescription": { + "message": "Audio notification on skip will play a sound whenever a sponsor is skipped. If disabled (or auto skip is disabled), no sound will be played." + }, "youHaveSkipped": { "message": "You have skipped " }, diff --git a/public/icons/beep.ogg b/public/icons/beep.ogg new file mode 100644 index 00000000..37f92fe4 Binary files /dev/null and b/public/icons/beep.ogg differ diff --git a/public/options/options.html b/public/options/options.html index 658c3704..1b423d26 100644 --- a/public/options/options.html +++ b/public/options/options.html @@ -100,6 +100,25 @@

+ + +
+ + +
+
+ +
__MSG_audioNotificationDescription__
+
+ +
+
+
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 0b06858d..3cf3831f 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -32,6 +32,7 @@ class SkipNoticeComponent extends React.Component + + {(Config.config.audioNotificationOnSkip) && } {/* Text Boxes */} {this.getMessageBoxes()} diff --git a/src/config.ts b/src/config.ts index 33a1fb31..cc403e13 100644 --- a/src/config.ts +++ b/src/config.ts @@ -24,6 +24,7 @@ interface SBConfig { supportInvidious: boolean, serverAddress: string, minDuration: number, + audioNotificationOnSkip, checkForUnlistedVideos: boolean, mobileUpdateShowCount: number, @@ -121,6 +122,7 @@ var Config: SBObject = { supportInvidious: false, serverAddress: CompileConfig.serverAddress, minDuration: 0, + audioNotificationOnSkip: false, checkForUnlistedVideos: false, mobileUpdateShowCount: 0, categorySelections: [{