From aee0712ef1f57ed82f1907d0e865a7e70be7c46b Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 11 Jan 2020 13:27:20 -0500 Subject: [PATCH 1/3] Fixed old sponsortime config being broken. --- SB.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SB.js b/SB.js index a7f8d048..ef624dc7 100644 --- a/SB.js +++ b/SB.js @@ -131,7 +131,7 @@ function migrateOldFormats() { // Convert sponsorTimes format for (key in SB.localConfig) { if (key.startsWith("sponsorTimes") && key !== "sponsorTimes" && key !== "sponsorTimesContributed") { SB.config.sponsorTimes.set(key.substr(12), SB.config[key]); - delete SB.config[key]; + chrome.storage.sync.remove(key); } } } @@ -178,11 +178,11 @@ function convertJSON() { // Add defaults function addDefaults() { - Object.keys(SB.defaults).forEach(key => { - if(!SB.localConfig.hasOwnProperty(key)) { + for (const key in SB.defaults) { + if(!SB.localConfig.hasOwnProperty(key)) { SB.localConfig[key] = SB.defaults[key]; } - }); + } }; // Sync config From 04942a3a5d5c8314485f5055de39aa1642ea61e2 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 11 Jan 2020 13:35:20 -0500 Subject: [PATCH 2/3] Fixed delete button potentially appearing. --- content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content.js b/content.js index f3b96fe0..72dbac22 100644 --- a/content.js +++ b/content.js @@ -721,7 +721,7 @@ async function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { await wait(isSubmitButtonLoaded); //if it isn't visible, there is no data - let shouldHide = (uploadButtonVisible && !SB.config.hideDeleteButtonPlayerControls) ? "unset" : "none" + let shouldHide = (uploadButtonVisible && !(SB.config.hideDeleteButtonPlayerControls || onInvidious)) ? "unset" : "none" document.getElementById("deleteButton").style.display = shouldHide; if (showStartSponsor) { From 115b1edf1138ec5793d7d6c82803b94043d82297 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 11 Jan 2020 13:41:44 -0500 Subject: [PATCH 3/3] Increased version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c7798630..0a02b00b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.2.3", + "version": "1.2.4", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [