mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Added option to disable notification
This commit is contained in:
parent
3f98e2fc73
commit
93316bf463
3 changed files with 16 additions and 6 deletions
|
@ -623,5 +623,11 @@
|
|||
},
|
||||
"categoryUpdate2": {
|
||||
"message": "Open the options to skip intros, outros, merch, etc."
|
||||
},
|
||||
"unsubmittedWarning": {
|
||||
"message": "Unsubmitted Segments Notification"
|
||||
},
|
||||
"unsubmittedWarningDescription": {
|
||||
"message": "Send a notification when you leave a video with segments that are not uploaded"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,12 +62,14 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) {
|
|||
//this allows the callback to be called later
|
||||
return true;
|
||||
case "alertPrevious":
|
||||
chrome.notifications.create("stillThere" + Math.random(), {
|
||||
type: "basic",
|
||||
title: chrome.i18n.getMessage("wantToSubmit") + " " + request.previousVideoID + "?",
|
||||
message: chrome.i18n.getMessage("leftTimes"),
|
||||
iconUrl: "./icons/LogoSponsorBlocker256px.png"
|
||||
});
|
||||
if (Config.config.unsubmittedWarning) {
|
||||
chrome.notifications.create("stillThere" + Math.random(), {
|
||||
type: "basic",
|
||||
title: chrome.i18n.getMessage("wantToSubmit") + " " + request.previousVideoID + "?",
|
||||
message: chrome.i18n.getMessage("leftTimes"),
|
||||
iconUrl: "./icons/LogoSponsorBlocker256px.png"
|
||||
});
|
||||
}
|
||||
case "registerContentScript":
|
||||
registerFirefoxContentScript(request);
|
||||
return false;
|
||||
|
|
|
@ -15,6 +15,7 @@ interface SBConfig {
|
|||
skipCount: number,
|
||||
sponsorTimesContributed: number,
|
||||
submissionCountSinceCategories: number, // New count used to show the "Read The Guidelines!!" message
|
||||
unsubmittedWarning: boolean,
|
||||
disableSkipping: boolean,
|
||||
trackViewCount: boolean,
|
||||
dontShowNotice: boolean,
|
||||
|
@ -132,6 +133,7 @@ var Config: SBObject = {
|
|||
skipCount: 0,
|
||||
sponsorTimesContributed: 0,
|
||||
submissionCountSinceCategories: 0,
|
||||
unsubmittedWarning: true,
|
||||
disableSkipping: false,
|
||||
trackViewCount: true,
|
||||
dontShowNotice: false,
|
||||
|
|
Loading…
Reference in a new issue