diff options
author | Ajay Ramachandran <[email protected]> | 2021-01-17 13:00:27 -0500 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-01-17 13:00:27 -0500 |
commit | 2fcfc989cf739ee3c4756b6bd5bad8fc2f710932 (patch) | |
tree | 06bdbb178002b147b1e49d05b199fa7ecb2b7cc5 | |
parent | 7bb8f446bffbab9ecf6b8ee790653960d1d72928 (diff) | |
download | SponsorBlock-2fcfc989cf739ee3c4756b6bd5bad8fc2f710932.tar.gz SponsorBlock-2fcfc989cf739ee3c4756b6bd5bad8fc2f710932.zip |
Remove unsubmitted notification
-rw-r--r-- | manifest/manifest.json | 1 | ||||
-rw-r--r-- | public/_locales/en/messages.json | 9 | ||||
-rw-r--r-- | public/options/options.html | 17 | ||||
-rw-r--r-- | src/background.ts | 10 | ||||
-rw-r--r-- | src/config.ts | 2 | ||||
-rw-r--r-- | src/content.ts | 20 |
6 files changed, 0 insertions, 59 deletions
diff --git a/manifest/manifest.json b/manifest/manifest.json index 7f60599f..c25f2275 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -46,7 +46,6 @@ ], "permissions": [ "storage", - "notifications", "https://sponsor.ajay.app/*" ], "optional_permissions": [ diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 5f92d260..0a761cf5 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -97,9 +97,6 @@ "wantToSubmit": { "message": "Do you want to submit for video id" }, - "leftTimes": { - "message": "You seem to have left some segments unsubmitted. Go back to that page to submit them (they are not deleted)." - }, "clearTimes": { "message": "Clear Segments" }, @@ -631,12 +628,6 @@ "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" - }, "help": { "message": "Help" } diff --git a/public/options/options.html b/public/options/options.html index 04620a9e..68c28cbd 100644 --- a/public/options/options.html +++ b/public/options/options.html @@ -152,23 +152,6 @@ <br/> <br/> - <div option-type="toggle" sync-option="unsubmittedWarning"> - <label class="switch-container" label-name="__MSG_unsubmittedWarning__"> - <label class="switch"> - <input type="checkbox" checked> - <span class="slider round"></span> - </label> - </label> - - <br/> - <br/> - - <div class="small-description">__MSG_unsubmittedWarningDescription__</div> - </div> - - <br/> - <br/> - <div option-type="toggle" sync-option="forceChannelCheck"> <label class="switch-container" label-name="__MSG_forceChannelCheck__"> <label class="switch"> diff --git a/src/background.ts b/src/background.ts index e9643667..ea011576 100644 --- a/src/background.ts +++ b/src/background.ts @@ -52,16 +52,6 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) { //this allows the callback to be called later return true; - case "alertPrevious": - 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" - }); - } - break; case "registerContentScript": registerFirefoxContentScript(request); return false; diff --git a/src/config.ts b/src/config.ts index 4eb3e43d..e355d795 100644 --- a/src/config.ts +++ b/src/config.ts @@ -17,7 +17,6 @@ interface SBConfig { sponsorTimesContributed: number, submissionCountSinceCategories: number, // New count used to show the "Read The Guidelines!!" message showTimeWithSkips: boolean, - unsubmittedWarning: boolean, disableSkipping: boolean, trackViewCount: boolean, dontShowNotice: boolean, @@ -150,7 +149,6 @@ const Config: SBObject = { sponsorTimesContributed: 0, submissionCountSinceCategories: 0, showTimeWithSkips: true, - unsubmittedWarning: true, disableSkipping: false, trackViewCount: true, dontShowNotice: false, diff --git a/src/content.ts b/src/content.ts index aba53f24..ab3ece52 100644 --- a/src/content.ts +++ b/src/content.ts @@ -19,7 +19,6 @@ utils.wait(() => Config.config !== null, 5000, 10).then(addCSS); //was sponsor data found when doing SponsorsLookup let sponsorDataFound = false; -let previousVideoID: VideoID = null; //the actual sponsorTimes if loaded and UUIDs associated with them let sponsorTimes: SponsorTime[] = null; //what video id are these sponsors for @@ -310,25 +309,6 @@ async function videoIDChange(id) { } } - //warn them if they had unsubmitted times - if (previousVideoID != null) { - //get the sponsor times from storage - const sponsorTimes = Config.config.segmentTimes.get(previousVideoID); - if (sponsorTimes != undefined && sponsorTimes.length > 0 && new URL(document.URL).host !== "music.youtube.com") { - //warn them that they have unsubmitted sponsor times - chrome.runtime.sendMessage({ - message: "alertPrevious", - previousVideoID: previousVideoID - }); - } - - //set the previous video id to the currentID - previousVideoID = id; - } else { - //set the previous id now, don't wait for chrome.storage.get - previousVideoID = id; - } - //close popup closeInfoMenu(); |