mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Added option to disable notification
This commit is contained in:
@@ -623,5 +623,11 @@
|
|||||||
},
|
},
|
||||||
"categoryUpdate2": {
|
"categoryUpdate2": {
|
||||||
"message": "Open the options to skip intros, outros, merch, etc."
|
"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
|
//this allows the callback to be called later
|
||||||
return true;
|
return true;
|
||||||
case "alertPrevious":
|
case "alertPrevious":
|
||||||
chrome.notifications.create("stillThere" + Math.random(), {
|
if (Config.config.unsubmittedWarning) {
|
||||||
type: "basic",
|
chrome.notifications.create("stillThere" + Math.random(), {
|
||||||
title: chrome.i18n.getMessage("wantToSubmit") + " " + request.previousVideoID + "?",
|
type: "basic",
|
||||||
message: chrome.i18n.getMessage("leftTimes"),
|
title: chrome.i18n.getMessage("wantToSubmit") + " " + request.previousVideoID + "?",
|
||||||
iconUrl: "./icons/LogoSponsorBlocker256px.png"
|
message: chrome.i18n.getMessage("leftTimes"),
|
||||||
});
|
iconUrl: "./icons/LogoSponsorBlocker256px.png"
|
||||||
|
});
|
||||||
|
}
|
||||||
case "registerContentScript":
|
case "registerContentScript":
|
||||||
registerFirefoxContentScript(request);
|
registerFirefoxContentScript(request);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ interface SBConfig {
|
|||||||
skipCount: number,
|
skipCount: number,
|
||||||
sponsorTimesContributed: number,
|
sponsorTimesContributed: number,
|
||||||
submissionCountSinceCategories: number, // New count used to show the "Read The Guidelines!!" message
|
submissionCountSinceCategories: number, // New count used to show the "Read The Guidelines!!" message
|
||||||
|
unsubmittedWarning: boolean,
|
||||||
disableSkipping: boolean,
|
disableSkipping: boolean,
|
||||||
trackViewCount: boolean,
|
trackViewCount: boolean,
|
||||||
dontShowNotice: boolean,
|
dontShowNotice: boolean,
|
||||||
@@ -132,6 +133,7 @@ var Config: SBObject = {
|
|||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
sponsorTimesContributed: 0,
|
sponsorTimesContributed: 0,
|
||||||
submissionCountSinceCategories: 0,
|
submissionCountSinceCategories: 0,
|
||||||
|
unsubmittedWarning: true,
|
||||||
disableSkipping: false,
|
disableSkipping: false,
|
||||||
trackViewCount: true,
|
trackViewCount: true,
|
||||||
dontShowNotice: false,
|
dontShowNotice: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user