From e5add6c392bb021c3d27d3b8a938d3b25762fb84 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 16:55:47 +0100 Subject: [PATCH 01/53] Create LANG.js --- LANG.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 LANG.js diff --git a/LANG.js b/LANG.js new file mode 100644 index 00000000..0a197278 --- /dev/null +++ b/LANG.js @@ -0,0 +1,9 @@ + // File to store strings for diffrent languages + + var EN_US = new Map(); + + EN_US.set(400, 'Server said this request was invalid"') + .set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') + .set(409, 'This has already been submitted before') + .set(502, 'It seems the server is down. Contact the dev to inform them.') + .set('Unknown', 'There was an error submitting your sponsor times, please try again later.'); From 21b5fc9723aec794ee9ea56b91ec66cc4868aa28 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 16:59:57 +0100 Subject: [PATCH 02/53] Added LANG.js --- manifest.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifest.json b/manifest.json index 1fe36a7c..e2fa65a5 100644 --- a/manifest.json +++ b/manifest.json @@ -10,6 +10,7 @@ ], "all_frames": true, "js": [ + "LANG.js", "config.js", "content.js", "popup.js" @@ -48,6 +49,7 @@ }, "background": { "scripts":[ + "LANG.js", "config.js", "background.js" ] From 86fee63a8b73fc351cdb4079f46b5b442976627c Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 17:04:50 +0100 Subject: [PATCH 03/53] Moving into LANG --- popup.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/popup.js b/popup.js index 8368f274..a4ef46f6 100644 --- a/popup.js +++ b/popup.js @@ -81,15 +81,6 @@ function runThePopup() { SB.optionsButton.addEventListener("click", openOptions); SB.reportAnIssue.addEventListener("click", reportAnIssue); SB.hideDiscordButton.addEventListener("click", hideDiscordButton); - - //setup error message languages - var EN_US = new Map(); - - EN_US.set(400, 'Server said this request was invalid"') - .set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') - .set(409, 'This has already been submitted before') - .set(502, 'It seems the server is down. Contact the dev to inform them.') - .set('Unknown', 'There was an error submitting your sponsor times, please try again later.'); //if true, the button now selects the end time let startTimeChosen = false; @@ -698,11 +689,6 @@ function runThePopup() { resetStartTimeChosen(); } - function getErrorMessage(lang, statusCode) { - if(lang.has(statusCode)) return lang.get(statusCode); - return lang.get('Unknown').concat(" Error code: ") + statusCode; - } - function submitTimes() { //make info message say loading SB.submitTimesInfoMessage.innerText = "Loading..."; @@ -1143,4 +1129,4 @@ if (chrome.tabs != undefined) { //this means it is actually opened in the popup runThePopup(); -} \ No newline at end of file +} From 37df697b3d1b0d50f50d562fe1329430d331d180 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 17:08:29 +0100 Subject: [PATCH 04/53] Added Utils for lang --- LANG.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/LANG.js b/LANG.js index 0a197278..7dc08c3a 100644 --- a/LANG.js +++ b/LANG.js @@ -1,7 +1,22 @@ // File to store strings for diffrent languages + + + // Utils + function getErrorMessage(lang, statusCode) { + if(lang.has(statusCode)) return lang.get(statusCode); + return lang.get('Unknown').concat(" Error code: ") + statusCode; + } + function MSG(lang, message) { + if(lang.has(message)) return lang.get(message); + console.warn("Could not find key " + message + " for lang "+lang); + return ""; + } + + //Declare Maps var EN_US = new Map(); - + + // Main EN_US.set(400, 'Server said this request was invalid"') .set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') .set(409, 'This has already been submitted before') From 24c61bab71942c1383c9856a845681e008c421e0 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 17:15:57 +0100 Subject: [PATCH 05/53] Auto detect lang --- LANG.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/LANG.js b/LANG.js index 7dc08c3a..58b8fd69 100644 --- a/LANG.js +++ b/LANG.js @@ -1,23 +1,23 @@ // File to store strings for diffrent languages - + lang = navigator.language.replace("-", "_"); // Utils - function getErrorMessage(lang, statusCode) { + function getErrorMessage(statusCode) { if(lang.has(statusCode)) return lang.get(statusCode); return lang.get('Unknown').concat(" Error code: ") + statusCode; } - function MSG(lang, message) { + function MSG(message) { if(lang.has(message)) return lang.get(message); console.warn("Could not find key " + message + " for lang "+lang); return ""; } //Declare Maps - var EN_US = new Map(); + var en_US = new Map(); // Main - EN_US.set(400, 'Server said this request was invalid"') + en_US.set(400, 'Server said this request was invalid"') .set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') .set(409, 'This has already been submitted before') .set(502, 'It seems the server is down. Contact the dev to inform them.') From c09cff86b5303d1b1a474b9fad7fb09a12dfbad9 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 17:33:16 +0100 Subject: [PATCH 06/53] Update popup.js --- popup.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/popup.js b/popup.js index a4ef46f6..de370426 100644 --- a/popup.js +++ b/popup.js @@ -127,7 +127,7 @@ function runThePopup() { SB.whitelistChannel.style.display = "none"; SB.unwhitelistChannel.style.display = "unset"; - SB.downloadedSponsorMessageTimes.innerText = "Channel Whitelisted!"; + SB.downloadedSponsorMessageTimes.innerText = MSG("CWL"); SB.downloadedSponsorMessageTimes.style.fontWeight = "bold"; } }); @@ -179,9 +179,9 @@ function runThePopup() { chrome.storage.sync.get(["sponsorTimesContributed"], function(result) { if (result.sponsorTimesContributed != undefined) { if (result.sponsorTimesContributed > 1) { - SB.sponsorTimesContributionsDisplayEndWord.innerText = "sponsors." + SB.sponsorTimesContributionsDisplayEndWord.innerText = MSG("SPs"); } else { - SB.sponsorTimesContributionsDisplayEndWord.innerText = "sponsor." + SB.sponsorTimesContributionsDisplayEndWord.innerText = MSG("SP"); } SB.sponsorTimesContributionsDisplay.innerText = result.sponsorTimesContributed; SB.sponsorTimesContributionsContainer.style.display = "unset"; @@ -197,9 +197,9 @@ function runThePopup() { let viewCount = JSON.parse(xmlhttp.responseText).viewCount; if (viewCount != 0) { if (viewCount > 1) { - SB.sponsorTimesViewsDisplayEndWord.innerText = "sponsor segments." + SB.sponsorTimesViewsDisplayEndWord.innerText = MSG("SPSEGs"); } else { - SB.sponsorTimesViewsDisplayEndWord.innerText = "sponsor segment." + SB.sponsorTimesViewsDisplayEndWord.innerText = MSG("SPSEG"); } SB.sponsorTimesViewsDisplay.innerText = viewCount; @@ -276,11 +276,11 @@ function runThePopup() { SB.loadingIndicator.innerHTML = ""; if (request.found) { - SB.videoFound.innerHTML = "This video's sponsors are in the database!" + SB.videoFound.innerHTML = MSG("SP_FOUND"); displayDownloadedSponsorTimes(request); } else { - SB.videoFound.innerHTML = "No sponsors found" + SB.videoFound.innerHTML = MSG("SP_NONE"); } } } @@ -358,7 +358,7 @@ function runThePopup() { function displayDownloadedSponsorTimes(request) { if (request.sponsorTimes != undefined) { //set it to the message - if (SB.downloadedSponsorMessageTimes.innerText != "Channel Whitelisted!") { + if (SB.downloadedSponsorMessageTimes.innerText != MSG("CWL")) { SB.downloadedSponsorMessageTimes.innerText = getSponsorTimesMessage(request.sponsorTimes); } @@ -706,7 +706,7 @@ function runThePopup() { clearTimes(); } else { - let errorMessage = getErrorMessage(EN_US, response.statusCode); + let errorMessage = getErrorMessage(response.statusCode); document.getElementById("submitTimesInfoMessage").innerText = errorMessage; document.getElementById("submitTimesInfoMessageContainer").style.display = "unset"; @@ -873,7 +873,7 @@ function runThePopup() { //update startTimeChosen letiable if (!startTimeChosen) { startTimeChosen = true; - SB.sponsorStart.innerHTML = "Sponsorship Ends Now"; + SB.sponsorStart.innerHTML = MSG("SP_END"); } else { resetStartTimeChosen(); } @@ -882,7 +882,7 @@ function runThePopup() { //set it to false function resetStartTimeChosen() { startTimeChosen = false; - SB.sponsorStart.innerHTML = "Sponsorship Starts Now"; + SB.sponsorStart.innerHTML = "SP_START"; } //hides and shows the submit times button when needed @@ -905,8 +905,7 @@ function runThePopup() { //this is not a YouTube video page function displayNoVideo() { - document.getElementById("loadingIndicator").innerHTML = "This probably isn't a YouTube tab, or you clicked too early. " + - "If you know this is a YouTube tab, close this popup and open it again."; + document.getElementById("loadingIndicator").innerHTML = MSG("NOTYT"); } function reportAnIssue() { @@ -943,7 +942,7 @@ function runThePopup() { //see if it was a success or failure if (response.successType == 1) { //success - addVoteMessage("Thanks for voting!", UUID) + addVoteMessage(MSG("VOTE"), UUID) } else if (response.successType == 0) { //failure: duplicate vote addVoteMessage("You have already voted this way before.", UUID) From c7f8a392828f311afa7dab68473d9d828bd42c4e Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 17:45:10 +0100 Subject: [PATCH 07/53] Update LANG.js --- LANG.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/LANG.js b/LANG.js index 58b8fd69..007f72a9 100644 --- a/LANG.js +++ b/LANG.js @@ -17,8 +17,23 @@ var en_US = new Map(); // Main - en_US.set(400, 'Server said this request was invalid"') - .set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') - .set(409, 'This has already been submitted before') - .set(502, 'It seems the server is down. Contact the dev to inform them.') - .set('Unknown', 'There was an error submitting your sponsor times, please try again later.'); +en_US.set(400, 'Server said this request was invalid"') +.set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') +.set(409, 'This has already been submitted before') +.set(502, 'It seems the server is down. Contact the dev to inform them.') +.set('Unknown', 'There was an error submitting your sponsor times, please try again later.') +.set("CWL","Channel Whitelisted!") +.set("SPs","sponsors.") +.set("SP","sponsor.") +.set("SPSEGs","sponsor segments.") +.set("SPSEG","sponsor segment.") +.set("SP_FOUND","This video's sponsors are in the database!") +.set("SP_NONE","No sponsors found) +.set("SP_END","Sponsorship Ends Now") +.set("SP_START","Sponsorship Starts Now") +.set("NOTYTT","his probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again.") +.set("VOTE","Thanks for voting!") +.set("VOTE_FAIL","You have already voted this way before.") +.set("It seems the sever is down. Contact the dev immediately.","SBDOWN") + + From 8e3a46d3933ef2ec9a35a914e6cada06cbdf882d Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 17:45:56 +0100 Subject: [PATCH 08/53] Update LANG.js --- LANG.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LANG.js b/LANG.js index 007f72a9..8f8c61a9 100644 --- a/LANG.js +++ b/LANG.js @@ -28,7 +28,7 @@ en_US.set(400, 'Server said this request was invalid"') .set("SPSEGs","sponsor segments.") .set("SPSEG","sponsor segment.") .set("SP_FOUND","This video's sponsors are in the database!") -.set("SP_NONE","No sponsors found) +.set("SP_NONE","No sponsors found") .set("SP_END","Sponsorship Ends Now") .set("SP_START","Sponsorship Starts Now") .set("NOTYTT","his probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again.") From 4c37bd24ac9d178657c5716ebc97bb30b2e77502 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Wed, 7 Aug 2019 18:12:04 +0100 Subject: [PATCH 09/53] Update LANG.js --- LANG.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LANG.js b/LANG.js index 8f8c61a9..09264f21 100644 --- a/LANG.js +++ b/LANG.js @@ -31,7 +31,7 @@ en_US.set(400, 'Server said this request was invalid"') .set("SP_NONE","No sponsors found") .set("SP_END","Sponsorship Ends Now") .set("SP_START","Sponsorship Starts Now") -.set("NOTYTT","his probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again.") +.set("NOTYT","his probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again.") .set("VOTE","Thanks for voting!") .set("VOTE_FAIL","You have already voted this way before.") .set("It seems the sever is down. Contact the dev immediately.","SBDOWN") From c8341a448de05deca9972e032f0fca49691892c5 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 18:33:36 +0100 Subject: [PATCH 10/53] Switched to native --- LANG.js | 39 ------------------------ _locales/en/messages.json | 63 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 39 deletions(-) delete mode 100644 LANG.js create mode 100644 _locales/en/messages.json diff --git a/LANG.js b/LANG.js deleted file mode 100644 index 09264f21..00000000 --- a/LANG.js +++ /dev/null @@ -1,39 +0,0 @@ - // File to store strings for diffrent languages - lang = navigator.language.replace("-", "_"); - - // Utils - function getErrorMessage(statusCode) { - if(lang.has(statusCode)) return lang.get(statusCode); - return lang.get('Unknown').concat(" Error code: ") + statusCode; - } - - function MSG(message) { - if(lang.has(message)) return lang.get(message); - console.warn("Could not find key " + message + " for lang "+lang); - return ""; - } - - //Declare Maps - var en_US = new Map(); - - // Main -en_US.set(400, 'Server said this request was invalid"') -.set(429, 'You have submitted too many sponsor times for this one video, are you sure there are this many?') -.set(409, 'This has already been submitted before') -.set(502, 'It seems the server is down. Contact the dev to inform them.') -.set('Unknown', 'There was an error submitting your sponsor times, please try again later.') -.set("CWL","Channel Whitelisted!") -.set("SPs","sponsors.") -.set("SP","sponsor.") -.set("SPSEGs","sponsor segments.") -.set("SPSEG","sponsor segment.") -.set("SP_FOUND","This video's sponsors are in the database!") -.set("SP_NONE","No sponsors found") -.set("SP_END","Sponsorship Ends Now") -.set("SP_START","Sponsorship Starts Now") -.set("NOTYT","his probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again.") -.set("VOTE","Thanks for voting!") -.set("VOTE_FAIL","You have already voted this way before.") -.set("It seems the sever is down. Contact the dev immediately.","SBDOWN") - - diff --git a/_locales/en/messages.json b/_locales/en/messages.json new file mode 100644 index 00000000..1136bd62 --- /dev/null +++ b/_locales/en/messages.json @@ -0,0 +1,63 @@ +{ + "Name": { + "message": "SponsorBlock", + "description": "Name of the extension." + }, + + "Description": { + "message": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", + "description": "Description of the extension." + }, + + "400": { + "message": "Server said this request was invalid" + }, + "429": { + "message": "You have submitted too many sponsor times for this one video, are you sure there are this many?" + }, + "409": { + "message": "This has already been submitted before" + }, + "502": { + "message": "It seems the server is down. Contact the dev to inform them." + }, + "ChannelWhitelisted": { + "message": "Channel Whitelisted!" + }, + "Sponsor": { + "message": "Sponsor" + }, + "Sponsors": { + "message": "Sponsors" + }, + "Segments": { + "message": "sponsor segments" + }, + "Unknown": { + "message": "There was an error submitting your sponsor times, please try again later." + }, + "SponsorFound": { + "message": "This video's sponsors are in the database!" + }, + "Sponsor404": { + "message": "No sponsors found" + }, + "SponsorStart": { + "message": "Sponsorship Starts Now" + }, + "SponsorEND": { + "message": "Sponsorship Ends Now" + }, + "noVIDEOID": { + "message": "this probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again." + }, + "VOTED": { + "message": "Thanks for voting!" + }, + "VOTE_FAIL": { + "message": "You have already voted this way before." + }, + "ServerDown": { + "message": "It seems the sever is down. Contact the dev immediately." + }, +} From a2750ad70985e9ba3ec2cbabb679fa95c5bdcee9 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 18:34:17 +0100 Subject: [PATCH 11/53] Fixed JSON --- _locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 1136bd62..2c9c0e41 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -59,5 +59,5 @@ }, "ServerDown": { "message": "It seems the sever is down. Contact the dev immediately." - }, + } } From 189a28f027e4e548a0a8e880789dff227b7aeb41 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 18:36:02 +0100 Subject: [PATCH 12/53] added fullName --- _locales/en/messages.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2c9c0e41..82fd5008 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -3,6 +3,10 @@ "message": "SponsorBlock", "description": "Name of the extension." }, + "fullName": { + "message": "SponsorBlock for YouTube - Skip Sponsorships", + "description": "Name of the extension." + }, "Description": { "message": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", From cc3f970aef85e91693bf9026c7bdb4e44be6c0d4 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 18:40:16 +0100 Subject: [PATCH 13/53] Internationalization --- manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 5360b2e2..215ea951 100644 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,9 @@ { - "name": "SponsorBlock for YouTube - Skip Sponsorships", - "short_name": "SponsorBlock", + "name": "__MSG_fullName__", + "short_name": "__MSG_Name__", "version": "1.0.31", - "description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", + "default_locale": "en", + "description": "__MSG_Description__", "content_scripts": [ { "matches": [ @@ -10,7 +11,6 @@ ], "all_frames": true, "js": [ - "LANG.js", "config.js", "utils.js", "content.js", From 71d2231fb51055ed8df4f58e5981ccac652b0912 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 18:41:45 +0100 Subject: [PATCH 14/53] Update messages.json --- _locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 82fd5008..ca8a455d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -53,7 +53,7 @@ "message": "Sponsorship Ends Now" }, "noVIDEOID": { - "message": "this probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again." + "message": "This probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again." }, "VOTED": { "message": "Thanks for voting!" From 9a2bce4ba68f1dd33a84d21147c2114cf67698cf Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 19:35:08 +0100 Subject: [PATCH 15/53] Added Segment --- _locales/en/messages.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ca8a455d..232fd85b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -33,6 +33,9 @@ }, "Sponsors": { "message": "Sponsors" + }, + "Segment": { + "message": "sponsor segment" }, "Segments": { "message": "sponsor segments" From 7a362776955dc0d24433418b863196f23df614ab Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 19:46:25 +0100 Subject: [PATCH 16/53] added connectionError --- _locales/en/messages.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 232fd85b..d2ad7169 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -66,5 +66,8 @@ }, "ServerDown": { "message": "It seems the sever is down. Contact the dev immediately." + }, + "connectionError": { + "message": "A connection error has occured. Error code: " } } From 334e32fb6bdf671b78756eee1a96d962639f54f8 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 19:47:11 +0100 Subject: [PATCH 17/53] i18n --- popup.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/popup.js b/popup.js index ec6e1f3c..ded54fef 100644 --- a/popup.js +++ b/popup.js @@ -159,9 +159,9 @@ function runThePopup() { chrome.storage.sync.get(["sponsorTimesContributed"], function(result) { if (result.sponsorTimesContributed != undefined) { if (result.sponsorTimesContributed > 1) { - SB.sponsorTimesContributionsDisplayEndWord.innerText = MSG("SPs"); + SB.sponsorTimesContributionsDisplayEndWord.innerText = browser.i18n.getMessage("Sponsors"); } else { - SB.sponsorTimesContributionsDisplayEndWord.innerText = MSG("SP"); + SB.sponsorTimesContributionsDisplayEndWord.innerText = browser.i18n.getMessage("Sponsor"); } SB.sponsorTimesContributionsDisplay.innerText = result.sponsorTimesContributed; SB.sponsorTimesContributionsContainer.style.display = "unset"; @@ -177,9 +177,9 @@ function runThePopup() { let viewCount = JSON.parse(xmlhttp.responseText).viewCount; if (viewCount != 0) { if (viewCount > 1) { - SB.sponsorTimesViewsDisplayEndWord.innerText = MSG("SPSEGs"); + SB.sponsorTimesViewsDisplayEndWord.innerText = browser.i18n.getMessage("Segments"); } else { - SB.sponsorTimesViewsDisplayEndWord.innerText = MSG("SPSEG"); + SB.sponsorTimesViewsDisplayEndWord.innerText = browser.i18n.getMessage("Segment"); } SB.sponsorTimesViewsDisplay.innerText = viewCount; @@ -256,11 +256,11 @@ function runThePopup() { SB.loadingIndicator.innerHTML = ""; if (request.found) { - SB.videoFound.innerHTML = MSG("SP_FOUND"); + SB.videoFound.innerHTML = browser.i18n.getMessage("SponsorFound"); displayDownloadedSponsorTimes(request); } else { - SB.videoFound.innerHTML = MSG("SP_NONE"); + SB.videoFound.innerHTML = browser.i18n.getMessage("Sponsor404"); } } @@ -358,7 +358,7 @@ function runThePopup() { function displayDownloadedSponsorTimes(request) { if (request.sponsorTimes != undefined) { //set it to the message - if (SB.downloadedSponsorMessageTimes.innerText != MSG("CWL")) { + if (SB.downloadedSponsorMessageTimes.innerText != browser.i18n.getMessage("ChannelWhitelisted")) { SB.downloadedSponsorMessageTimes.innerText = getSponsorTimesMessage(request.sponsorTimes); } @@ -873,7 +873,7 @@ function runThePopup() { //update startTimeChosen letiable if (!startTimeChosen) { startTimeChosen = true; - SB.sponsorStart.innerHTML = MSG("SP_END"); + SB.sponsorStart.innerHTML = browser.i18n.getMessage("SponsorEND"); } else { resetStartTimeChosen(); } @@ -905,7 +905,7 @@ function runThePopup() { //this is not a YouTube video page function displayNoVideo() { - document.getElementById("loadingIndicator").innerHTML = MSG("NOTYT"); + document.getElementById("loadingIndicator").innerHTML = browser.i18n.getMessage("Sponsor404"); } function reportAnIssue() { @@ -942,16 +942,16 @@ function runThePopup() { //see if it was a success or failure if (response.successType == 1) { //success - addVoteMessage(MSG("VOTE"), UUID) + addVoteMessage(browser.i18n.getMessage("VOTED"), UUID) } else if (response.successType == 0) { //failure: duplicate vote - addVoteMessage("You have already voted this way before.", UUID) + addVoteMessage(browser.i18n.getMessage("VOTE_FAIL"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { - addVoteMessage("It seems the sever is down. Contact the dev immediately.", UUID) + addVoteMessage(browser.i18n.getMessage("ServerDown"), UUID) } else { //failure: unknown error - addVoteMessage("A connection error has occured. Error code: " + response.statusCode, UUID) + addVoteMessage(browser.i18n.getMessage("connectionError") + response.statusCode, UUID) } } } From a30c7cf383d7688eb3a445476d52a476b1888281 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 20:08:26 +0100 Subject: [PATCH 18/53] Update messages.json --- _locales/en/messages.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d2ad7169..1028a7fc 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -40,9 +40,28 @@ "Segments": { "message": "sponsor segments" }, + "Dismiss": { + "message": "Dismiss" + }, + "Hide": { + "message": "Don't Show This Again" + }, + "HitGoBack": { + "message": "Hit go back to get to where you came from." + }, + "GoBack": { + "message": "Go back" + }, + "ConfirmMSG": { + "message": "\n\nTo edit or delete individual values, click the info button or open the extension popup by clicking the extension icon in the top right corner." + }, + "ClearThis": { + "message": "Are you sure you want to clear this?\n\n" + }, "Unknown": { "message": "There was an error submitting your sponsor times, please try again later." }, + "SponsorFound": { "message": "This video's sponsors are in the database!" }, From 59c2e5cae7a9b0e4d9f0b28acbe2146bc05521a4 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 20:10:13 +0100 Subject: [PATCH 19/53] i18n --- content.js | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/content.js b/content.js index c1060415..d4269fea 100644 --- a/content.js +++ b/content.js @@ -454,7 +454,7 @@ function addPlayerControlsButton() { let startSponsorButton = document.createElement("button"); startSponsorButton.id = "startSponsorButton"; startSponsorButton.className = "ytp-button playerButton"; - startSponsorButton.setAttribute("title", "Sponsor Starts Now"); + startSponsorButton.setAttribute("title", browser.i18n.getMessage("SponsorStart")); startSponsorButton.addEventListener("click", startSponsorClicked); let startSponsorImage = document.createElement("img"); @@ -546,7 +546,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { if (showStartSponsor) { showingStartSponsor = true; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png"); - document.getElementById("startSponsorButton").setAttribute("title", "Sponsor Starts Now"); + document.getElementById("startSponsorButton").setAttribute("title", browser.i18n.getMessage("SponsorStart")); if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible && !hideInfoButtonPlayerControls) { document.getElementById("submitButton").style.display = "unset"; @@ -557,7 +557,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { } else { showingStartSponsor = false; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker256px.png"); - document.getElementById("startSponsorButton").setAttribute("title", "Sponsor Ends Now"); + document.getElementById("startSponsorButton").setAttribute("title", browser.i18n.getMessage("SponsorEND")); //disable submit button document.getElementById("submitButton").style.display = "none"; @@ -745,8 +745,8 @@ function clearSponsorTimes() { let sponsorTimes = result[sponsorTimeKey]; if (sponsorTimes != undefined && sponsorTimes.length > 0) { - let confirmMessage = "Are you sure you want to clear this?\n\n" + getSponsorTimesMessage(sponsorTimes); - confirmMessage += "\n\nTo edit or delete individual values, click the info button or open the extension popup by clicking the extension icon in the top right corner." + let confirmMessage = browser.i18n.getMessage("ClearThis") + getSponsorTimesMessage(sponsorTimes); + confirmMessage += browser.i18n.getMessage("ConfirmMSG") if(!confirm(confirmMessage)) return; //clear the sponsor times @@ -827,17 +827,17 @@ function openSkipNotice(UUID){ buttonContainer.setAttribute("align", "center"); let goBackButton = document.createElement("button"); - goBackButton.innerText = "Go back"; + goBackButton.innerText = browser.i18n.getMessage("GoBack"); goBackButton.className = "sponsorSkipButton"; goBackButton.addEventListener("click", () => goBackToPreviousTime(UUID)); let hideButton = document.createElement("button"); - hideButton.innerText = "Dismiss"; + hideButton.innerText = browser.i18n.getMessage("Dismiss"); hideButton.className = "sponsorSkipButton"; hideButton.addEventListener("click", () => closeSkipNotice(UUID)); let dontShowAgainButton = document.createElement("button"); - dontShowAgainButton.innerText = "Don't Show This Again"; + dontShowAgainButton.innerText = browser.i18n.getMessage("Hide"); dontShowAgainButton.className = "sponsorSkipDontShowButton"; dontShowAgainButton.addEventListener("click", dontShowNoticeAgain); @@ -892,12 +892,12 @@ function afterDownvote(UUID) { //add thanks for voting text let thanksForVotingText = document.createElement("p"); thanksForVotingText.id = "sponsorTimesThanksForVotingText"; - thanksForVotingText.innerText = "Thanks for voting!" + thanksForVotingText.innerText = browser.i18n.getMessage("VOTED"); //add extra info for voting let thanksForVotingInfoText = document.createElement("p"); thanksForVotingInfoText.id = "sponsorTimesThanksForVotingInfoText"; - thanksForVotingInfoText.innerText = "Hit go back to get to where you came from." + thanksForVotingInfoText.innerText = browser.i18n.getMessage("HitGoBack"); //add element to div document.getElementById("sponsorTimesVoteButtonsContainer" + UUID).appendChild(thanksForVotingText); @@ -952,13 +952,13 @@ function vote(type, UUID) { } } else if (response.successType == 0) { //failure: duplicate vote - addLoadingInfo("It seems you've already voted before", UUID) + addLoadingInfo(browser.i18n.getMessage("VOTE_FAIL"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { - addLoadingInfo("It seems the sever is down. Contact the dev immediately.", UUID) + addLoadingInfo(browser.i18n.getMessage("ServerDown"), UUID) } else { //failure: unknown error - addLoadingInfo("A connection error has occured. Error code: " + response.statusCode, UUID) + addLoadingInfo((browser.i18n.getMessage("connectionError") + response.statusCode, UUID) } } @@ -1070,16 +1070,10 @@ function sendSubmitMessage(){ document.getElementById("submitButton").style.animation = "unset"; document.getElementById("submitButtonImage").src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker256px.png"); - if(response.statusCode == 400) { - alert("Server said this request was invalid"); - } else if(response.statusCode == 429) { - alert("You have submitted too many sponsor times for this one video, are you sure there are this many?"); - } else if(response.statusCode == 409) { - alert("This has already been submitted before"); - } else if(response.statusCode == 502) { - alert("It seems the server is down. Contact the dev to inform them. Error code " + response.statusCode); + if([400,429,409,502].includes(response.statusCode)) { + alert(browser.i18n.getMessage(response.statusCode)); } else { - alert("There was an error submitting your sponsor times, please try again later. Error code " + response.statusCode); + alert(browser.i18n.getMessage("connectionError") + response.statusCode); } } } From 0b801ae986f915155f9412e736fb137ac3a08ed0 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:23:11 +0100 Subject: [PATCH 20/53] browser.i18n -> chrome.i18n --- content.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/content.js b/content.js index 6c5227d2..efd64a04 100644 --- a/content.js +++ b/content.js @@ -486,7 +486,7 @@ function addPlayerControlsButton() { let startSponsorButton = document.createElement("button"); startSponsorButton.id = "startSponsorButton"; startSponsorButton.className = "ytp-button playerButton"; - startSponsorButton.setAttribute("title", browser.i18n.getMessage("SponsorStart")); + startSponsorButton.setAttribute("title", chrome.i18n.getMessage("SponsorStart")); startSponsorButton.addEventListener("click", startSponsorClicked); let startSponsorImage = document.createElement("img"); @@ -578,7 +578,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { if (showStartSponsor) { showingStartSponsor = true; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png"); - document.getElementById("startSponsorButton").setAttribute("title", browser.i18n.getMessage("SponsorStart")); + document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("SponsorStart")); if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible && !hideInfoButtonPlayerControls) { document.getElementById("submitButton").style.display = "unset"; @@ -589,7 +589,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { } else { showingStartSponsor = false; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker256px.png"); - document.getElementById("startSponsorButton").setAttribute("title", browser.i18n.getMessage("SponsorEND")); + document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("SponsorEND")); //disable submit button document.getElementById("submitButton").style.display = "none"; @@ -777,8 +777,8 @@ function clearSponsorTimes() { let sponsorTimes = result[sponsorTimeKey]; if (sponsorTimes != undefined && sponsorTimes.length > 0) { - let confirmMessage = browser.i18n.getMessage("ClearThis") + getSponsorTimesMessage(sponsorTimes); - confirmMessage += browser.i18n.getMessage("ConfirmMSG") + let confirmMessage = chrome.i18n.getMessage("ClearThis") + getSponsorTimesMessage(sponsorTimes); + confirmMessage += chrome.i18n.getMessage("ConfirmMSG") if(!confirm(confirmMessage)) return; //clear the sponsor times @@ -859,17 +859,17 @@ function openSkipNotice(UUID){ buttonContainer.setAttribute("align", "center"); let goBackButton = document.createElement("button"); - goBackButton.innerText = browser.i18n.getMessage("GoBack"); + goBackButton.innerText = chrome.i18n.getMessage("GoBack"); goBackButton.className = "sponsorSkipButton"; goBackButton.addEventListener("click", () => goBackToPreviousTime(UUID)); let hideButton = document.createElement("button"); - hideButton.innerText = browser.i18n.getMessage("Dismiss"); + hideButton.innerText = chrome.i18n.getMessage("Dismiss"); hideButton.className = "sponsorSkipButton"; hideButton.addEventListener("click", () => closeSkipNotice(UUID)); let dontShowAgainButton = document.createElement("button"); - dontShowAgainButton.innerText = browser.i18n.getMessage("Hide"); + dontShowAgainButton.innerText = chrome.i18n.getMessage("Hide"); dontShowAgainButton.className = "sponsorSkipDontShowButton"; dontShowAgainButton.addEventListener("click", dontShowNoticeAgain); @@ -924,12 +924,12 @@ function afterDownvote(UUID) { //add thanks for voting text let thanksForVotingText = document.createElement("p"); thanksForVotingText.id = "sponsorTimesThanksForVotingText"; - thanksForVotingText.innerText = browser.i18n.getMessage("VOTED"); + thanksForVotingText.innerText = chrome.i18n.getMessage("VOTED"); //add extra info for voting let thanksForVotingInfoText = document.createElement("p"); thanksForVotingInfoText.id = "sponsorTimesThanksForVotingInfoText"; - thanksForVotingInfoText.innerText = browser.i18n.getMessage("HitGoBack"); + thanksForVotingInfoText.innerText = chrome.i18n.getMessage("HitGoBack"); //add element to div document.getElementById("sponsorTimesVoteButtonsContainer" + UUID).appendChild(thanksForVotingText); @@ -984,13 +984,13 @@ function vote(type, UUID) { } } else if (response.successType == 0) { //failure: duplicate vote - addLoadingInfo(browser.i18n.getMessage("VOTE_FAIL"), UUID) + addLoadingInfo(chrome.i18n.getMessage("VOTE_FAIL"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { - addLoadingInfo(browser.i18n.getMessage("ServerDown"), UUID) + addLoadingInfo(chrome.i18n.getMessage("ServerDown"), UUID) } else { //failure: unknown error - addLoadingInfo((browser.i18n.getMessage("connectionError") + response.statusCode, UUID) + addLoadingInfo((chrome.i18n.getMessage("connectionError") + response.statusCode, UUID) } } @@ -1103,9 +1103,9 @@ function sendSubmitMessage(){ document.getElementById("submitButtonImage").src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker256px.png"); if([400,429,409,502].includes(response.statusCode)) { - alert(browser.i18n.getMessage(response.statusCode)); + alert(chrome.i18n.getMessage(response.statusCode)); } else { - alert(browser.i18n.getMessage("connectionError") + response.statusCode); + alert(chrome.i18n.getMessage("connectionError") + response.statusCode); } } } From ed9a445b4cb6a0bca26a6355bc7aa87e8974a62d Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:25:03 +0100 Subject: [PATCH 21/53] browser.i18n -> chrome.i18n --- popup.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/popup.js b/popup.js index 149c546b..0265d2a6 100644 --- a/popup.js +++ b/popup.js @@ -159,9 +159,9 @@ function runThePopup() { chrome.storage.sync.get(["sponsorTimesContributed"], function(result) { if (result.sponsorTimesContributed != undefined) { if (result.sponsorTimesContributed > 1) { - SB.sponsorTimesContributionsDisplayEndWord.innerText = browser.i18n.getMessage("Sponsors"); + SB.sponsorTimesContributionsDisplayEndWord.innerText = chrome.i18n.getMessage("Sponsors"); } else { - SB.sponsorTimesContributionsDisplayEndWord.innerText = browser.i18n.getMessage("Sponsor"); + SB.sponsorTimesContributionsDisplayEndWord.innerText = chrome.i18n.getMessage("Sponsor"); } SB.sponsorTimesContributionsDisplay.innerText = result.sponsorTimesContributed; SB.sponsorTimesContributionsContainer.style.display = "unset"; @@ -177,9 +177,9 @@ function runThePopup() { let viewCount = JSON.parse(xmlhttp.responseText).viewCount; if (viewCount != 0) { if (viewCount > 1) { - SB.sponsorTimesViewsDisplayEndWord.innerText = browser.i18n.getMessage("Segments"); + SB.sponsorTimesViewsDisplayEndWord.innerText = chrome.i18n.getMessage("Segments"); } else { - SB.sponsorTimesViewsDisplayEndWord.innerText = browser.i18n.getMessage("Segment"); + SB.sponsorTimesViewsDisplayEndWord.innerText = chrome.i18n.getMessage("Segment"); } SB.sponsorTimesViewsDisplay.innerText = viewCount; @@ -264,11 +264,11 @@ function runThePopup() { SB.loadingIndicator.innerHTML = ""; if (request.found) { - SB.videoFound.innerHTML = browser.i18n.getMessage("SponsorFound"); + SB.videoFound.innerHTML = chrome.i18n.getMessage("SponsorFound"); displayDownloadedSponsorTimes(request); } else { - SB.videoFound.innerHTML = browser.i18n.getMessage("Sponsor404"); + SB.videoFound.innerHTML = chrome.i18n.getMessage("Sponsor404"); } } @@ -366,7 +366,7 @@ function runThePopup() { function displayDownloadedSponsorTimes(request) { if (request.sponsorTimes != undefined) { //set it to the message - if (SB.downloadedSponsorMessageTimes.innerText != browser.i18n.getMessage("ChannelWhitelisted")) { + if (SB.downloadedSponsorMessageTimes.innerText != chrome.i18n.getMessage("ChannelWhitelisted")) { SB.downloadedSponsorMessageTimes.innerText = getSponsorTimesMessage(request.sponsorTimes); } @@ -950,7 +950,7 @@ function runThePopup() { //update startTimeChosen letiable if (!startTimeChosen) { startTimeChosen = true; - SB.sponsorStart.innerHTML = browser.i18n.getMessage("SponsorEND"); + SB.sponsorStart.innerHTML = chrome.i18n.getMessage("SponsorEND"); } else { resetStartTimeChosen(); } @@ -982,7 +982,7 @@ function runThePopup() { //this is not a YouTube video page function displayNoVideo() { - document.getElementById("loadingIndicator").innerHTML = browser.i18n.getMessage("Sponsor404"); + document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("Sponsor404"); } function reportAnIssue() { @@ -1019,16 +1019,16 @@ function runThePopup() { //see if it was a success or failure if (response.successType == 1) { //success - addVoteMessage(browser.i18n.getMessage("VOTED"), UUID) + addVoteMessage(chrome.i18n.getMessage("VOTED"), UUID) } else if (response.successType == 0) { //failure: duplicate vote - addVoteMessage(browser.i18n.getMessage("VOTE_FAIL"), UUID) + addVoteMessage(chrome.i18n.getMessage("VOTE_FAIL"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { - addVoteMessage(browser.i18n.getMessage("ServerDown"), UUID) + addVoteMessage(chrome.i18n.getMessage("ServerDown"), UUID) } else { //failure: unknown error - addVoteMessage(browser.i18n.getMessage("connectionError") + response.statusCode, UUID) + addVoteMessage(chrome.i18n.getMessage("connectionError") + response.statusCode, UUID) } } } From 37816ba7625830f44e65e98d501f093f966872a5 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:30:02 +0100 Subject: [PATCH 22/53] Rename index.html to index_en.html --- help/{index.html => index_en.html} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename help/{index.html => index_en.html} (99%) diff --git a/help/index.html b/help/index_en.html similarity index 99% rename from help/index.html rename to help/index_en.html index 61e4e6ad..52f24c27 100644 --- a/help/index.html +++ b/help/index_en.html @@ -119,4 +119,4 @@ - \ No newline at end of file + From a5e3dcaf4d9b2eb878a57154ace9bbd1d8fe5242 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:34:03 +0100 Subject: [PATCH 23/53] Update background.js --- background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/background.js b/background.js index c8d7d593..5f8573e9 100644 --- a/background.js +++ b/background.js @@ -55,7 +55,8 @@ chrome.runtime.onInstalled.addListener(function (object) { // TODO (shownInstallPage): remove this if statement, but leave contents if (!shownInstallPage){ //open up the install page - chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")}); + + chrome.tabs.create({url: chrome.extension.getURL("/help/"+navigator.language.split("-")[0]"-index.html")}); } // TODO (shownInstallPage): delete if statement and contents From 5031a85a5c76e76b3224cc7871f17156ed3226dd Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:38:44 +0100 Subject: [PATCH 24/53] Update background.js --- background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index 5f8573e9..55826752 100644 --- a/background.js +++ b/background.js @@ -32,8 +32,8 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) { } else if (request.message == "alertPrevious") { chrome.notifications.create("stillThere" + Math.random(), { type: "basic", - title: "Do you want to submit the sponsor times for video id " + request.previousVideoID + "?", - message: "You seem to have left some sponsor times unsubmitted. Go back to that page to submit them (they are not deleted).", + title: chrome.i18n.getMessage("Wanttosubmit") + request.previousVideoID + "?", + message: chrome.i18n.getMessage("leftTimes"), iconUrl: "./icons/LogoSponsorBlocker256px.png" }); } From 948293db049b692ccffd8e655374992ab56ab322 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:40:23 +0100 Subject: [PATCH 25/53] added popup --- _locales/en/messages.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 1028a7fc..d9726162 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -88,5 +88,14 @@ }, "connectionError": { "message": "A connection error has occured. Error code: " + }, + "Wanttosubmit": { + "message": "Do you want to submit the sponsor times for video id" + }, + "leftTimes": { + "message": "You seem to have left some sponsor times unsubmitted. Go back to that page to submit them (they are not deleted)." + }, + "popup": { + "message": "popup_en.html" } } From f2036885aad4e9632d392b6c164ff10e7bd53d9c Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:41:16 +0100 Subject: [PATCH 26/53] Update manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index a7450545..21c293ec 100644 --- a/manifest.json +++ b/manifest.json @@ -42,8 +42,8 @@ "https://sponsor.ajay.app/*" ], "browser_action": { - "default_title": "SponsorBlock", - "default_popup": "popup.html" + "default_title": "__MSG_Name__", + "default_popup": "__MSG_popup__" }, "background": { "scripts":[ From fb1836cd0789dc5596d9f4d330fd8686d50bf2f9 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:41:40 +0100 Subject: [PATCH 27/53] Rename popup.html to popup_en.html --- popup.html => popup_en.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename popup.html => popup_en.html (100%) diff --git a/popup.html b/popup_en.html similarity index 100% rename from popup.html rename to popup_en.html From 2deb2ff4b5cdf3b59115672ced08f517123e6cd0 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:43:34 +0100 Subject: [PATCH 28/53] added helpPage --- background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background.js b/background.js index 55826752..ac3630ee 100644 --- a/background.js +++ b/background.js @@ -56,7 +56,7 @@ chrome.runtime.onInstalled.addListener(function (object) { if (!shownInstallPage){ //open up the install page - chrome.tabs.create({url: chrome.extension.getURL("/help/"+navigator.language.split("-")[0]"-index.html")}); + chrome.tabs.create({url: chrome.extension.getURL("/help/"+chrome.i18n.getMessage("helpPage")}); } // TODO (shownInstallPage): delete if statement and contents From 806456d287b8ac2bff698173f872ba196d825841 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 21:45:14 +0100 Subject: [PATCH 29/53] added helpPage --- _locales/en/messages.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d9726162..36f3ef0d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -12,7 +12,9 @@ "message": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", "description": "Description of the extension." }, - + "helpPage": { + "message": "index_en.html" + }, "400": { "message": "Server said this request was invalid" }, From b13837ce4479348e1409ca153750bb0f084b14f8 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 22:07:24 +0100 Subject: [PATCH 30/53] CC --- _locales/en/messages.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 36f3ef0d..be5d528e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -27,7 +27,7 @@ "502": { "message": "It seems the server is down. Contact the dev to inform them." }, - "ChannelWhitelisted": { + "channelWhitelisted": { "message": "Channel Whitelisted!" }, "Sponsor": { @@ -48,56 +48,56 @@ "Hide": { "message": "Don't Show This Again" }, - "HitGoBack": { + "hitGoBack": { "message": "Hit go back to get to where you came from." }, - "GoBack": { + "goBack": { "message": "Go back" }, - "ConfirmMSG": { + "confirmMSG": { "message": "\n\nTo edit or delete individual values, click the info button or open the extension popup by clicking the extension icon in the top right corner." }, - "ClearThis": { + "clearThis": { "message": "Are you sure you want to clear this?\n\n" }, "Unknown": { "message": "There was an error submitting your sponsor times, please try again later." }, - "SponsorFound": { + "sponsorFound": { "message": "This video's sponsors are in the database!" }, - "Sponsor404": { + "sponsor404": { "message": "No sponsors found" }, - "SponsorStart": { + "sponsorStart": { "message": "Sponsorship Starts Now" }, - "SponsorEND": { + "sponsorEND": { "message": "Sponsorship Ends Now" }, "noVIDEOID": { "message": "This probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again." }, - "VOTED": { + "Voted": { "message": "Thanks for voting!" }, - "VOTE_FAIL": { + "voteFAIL": { "message": "You have already voted this way before." }, - "ServerDown": { + "serverDown": { "message": "It seems the sever is down. Contact the dev immediately." }, "connectionError": { "message": "A connection error has occured. Error code: " }, - "Wanttosubmit": { + "wantToSubmit": { "message": "Do you want to submit the sponsor times for video id" }, "leftTimes": { "message": "You seem to have left some sponsor times unsubmitted. Go back to that page to submit them (they are not deleted)." }, - "popup": { + "Popup": { "message": "popup_en.html" } } From bcc927f21a921b1076ea6a73396ee3becbb48693 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 22:10:33 +0100 Subject: [PATCH 31/53] CC --- background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background.js b/background.js index ac3630ee..2f6e304d 100644 --- a/background.js +++ b/background.js @@ -32,7 +32,7 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) { } else if (request.message == "alertPrevious") { chrome.notifications.create("stillThere" + Math.random(), { type: "basic", - title: chrome.i18n.getMessage("Wanttosubmit") + request.previousVideoID + "?", + title: chrome.i18n.getMessage("wantToSubmit") + request.previousVideoID + "?", message: chrome.i18n.getMessage("leftTimes"), iconUrl: "./icons/LogoSponsorBlocker256px.png" }); From 8c7d749f1179ea7c047686224c01cbf9b976c220 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 22:15:25 +0100 Subject: [PATCH 32/53] CC --- content.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/content.js b/content.js index efd64a04..265e1a41 100644 --- a/content.js +++ b/content.js @@ -486,7 +486,7 @@ function addPlayerControlsButton() { let startSponsorButton = document.createElement("button"); startSponsorButton.id = "startSponsorButton"; startSponsorButton.className = "ytp-button playerButton"; - startSponsorButton.setAttribute("title", chrome.i18n.getMessage("SponsorStart")); + startSponsorButton.setAttribute("title", chrome.i18n.getMessage("sponsorStart")); startSponsorButton.addEventListener("click", startSponsorClicked); let startSponsorImage = document.createElement("img"); @@ -578,7 +578,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { if (showStartSponsor) { showingStartSponsor = true; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png"); - document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("SponsorStart")); + document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("sponsorStart")); if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible && !hideInfoButtonPlayerControls) { document.getElementById("submitButton").style.display = "unset"; @@ -589,7 +589,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) { } else { showingStartSponsor = false; document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker256px.png"); - document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("SponsorEND")); + document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("sponsorEND")); //disable submit button document.getElementById("submitButton").style.display = "none"; @@ -777,8 +777,8 @@ function clearSponsorTimes() { let sponsorTimes = result[sponsorTimeKey]; if (sponsorTimes != undefined && sponsorTimes.length > 0) { - let confirmMessage = chrome.i18n.getMessage("ClearThis") + getSponsorTimesMessage(sponsorTimes); - confirmMessage += chrome.i18n.getMessage("ConfirmMSG") + let confirmMessage = chrome.i18n.getMessage("clearThis") + getSponsorTimesMessage(sponsorTimes); + confirmMessage += chrome.i18n.getMessage("confirmMSG") if(!confirm(confirmMessage)) return; //clear the sponsor times @@ -859,7 +859,7 @@ function openSkipNotice(UUID){ buttonContainer.setAttribute("align", "center"); let goBackButton = document.createElement("button"); - goBackButton.innerText = chrome.i18n.getMessage("GoBack"); + goBackButton.innerText = chrome.i18n.getMessage("goBack"); goBackButton.className = "sponsorSkipButton"; goBackButton.addEventListener("click", () => goBackToPreviousTime(UUID)); @@ -924,12 +924,12 @@ function afterDownvote(UUID) { //add thanks for voting text let thanksForVotingText = document.createElement("p"); thanksForVotingText.id = "sponsorTimesThanksForVotingText"; - thanksForVotingText.innerText = chrome.i18n.getMessage("VOTED"); + thanksForVotingText.innerText = chrome.i18n.getMessage("Voted"); //add extra info for voting let thanksForVotingInfoText = document.createElement("p"); thanksForVotingInfoText.id = "sponsorTimesThanksForVotingInfoText"; - thanksForVotingInfoText.innerText = chrome.i18n.getMessage("HitGoBack"); + thanksForVotingInfoText.innerText = chrome.i18n.getMessage("hitGoBack"); //add element to div document.getElementById("sponsorTimesVoteButtonsContainer" + UUID).appendChild(thanksForVotingText); @@ -984,10 +984,10 @@ function vote(type, UUID) { } } else if (response.successType == 0) { //failure: duplicate vote - addLoadingInfo(chrome.i18n.getMessage("VOTE_FAIL"), UUID) + addLoadingInfo(chrome.i18n.getMessage("voteFAIL"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { - addLoadingInfo(chrome.i18n.getMessage("ServerDown"), UUID) + addLoadingInfo(chrome.i18n.getMessage("serverDown"), UUID) } else { //failure: unknown error addLoadingInfo((chrome.i18n.getMessage("connectionError") + response.statusCode, UUID) From f9fcd8055262d95d16a7e69dfd1440980b306934 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 22:28:07 +0100 Subject: [PATCH 33/53] CC --- popup.js | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/popup.js b/popup.js index 0265d2a6..209763e1 100644 --- a/popup.js +++ b/popup.js @@ -200,13 +200,12 @@ function runThePopup() { function onTabs(tabs) { chrome.tabs.sendMessage(tabs[0].id, {message: 'getVideoID'}, function(result) { if (result != undefined && result.videoID) { - currentVideoID = result.videoID; - - loadTabData(tabs); + currentVideoID = result.videoID; + loadTabData(tabs); } else if (result == undefined && chrome.runtime.lastError) { - //this isn't a YouTube video then, or at least the content script is not loaded - displayNoVideo(); - } + //this isn't a YouTube video then, or at least the content script is not loaded + displayNoVideo(); + } }); } @@ -224,7 +223,7 @@ function runThePopup() { if (sponsorTimesStorage != undefined && sponsorTimesStorage.length > 0) { if (sponsorTimesStorage[sponsorTimesStorage.length - 1] != undefined && sponsorTimesStorage[sponsorTimesStorage.length - 1].length < 2) { startTimeChosen = true; - SB.sponsorStart.innerHTML = "Sponsorship Ends Now"; + SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEND"); } sponsorTimes = sponsorTimesStorage; @@ -264,11 +263,11 @@ function runThePopup() { SB.loadingIndicator.innerHTML = ""; if (request.found) { - SB.videoFound.innerHTML = chrome.i18n.getMessage("SponsorFound"); + SB.videoFound.innerHTML = chrome.i18n.getMessage("sponsorFound"); displayDownloadedSponsorTimes(request); } else { - SB.videoFound.innerHTML = chrome.i18n.getMessage("Sponsor404"); + SB.videoFound.innerHTML = chrome.i18n.getMessage("sponsor404"); } } @@ -366,7 +365,7 @@ function runThePopup() { function displayDownloadedSponsorTimes(request) { if (request.sponsorTimes != undefined) { //set it to the message - if (SB.downloadedSponsorMessageTimes.innerText != chrome.i18n.getMessage("ChannelWhitelisted")) { + if (SB.downloadedSponsorMessageTimes.innerText != chrome.i18n.getMessage("channelWhitelisted")) { SB.downloadedSponsorMessageTimes.innerText = getSponsorTimesMessage(request.sponsorTimes); } @@ -628,8 +627,8 @@ function runThePopup() { tabs[0].id, {message: "getCurrentTime"}, function (response) { - let minutes = document.getElementById(idStartName + "Minutes" + index); - let seconds = document.getElementById(idStartName + "Seconds" + index); + let minutes = document.getElementById(idStartName + chrome.i18n.getMessage("Mins") + index); + let seconds = document.getElementById(idStartName + chrome.i18n.getMessage("Secs") + index); minutes.value = getTimeInMinutes(response.currentTime); seconds.value = getTimeInFormattedSeconds(response.currentTime); @@ -640,8 +639,8 @@ function runThePopup() { //id start name is whether it is the startTime or endTime //gives back the time in seconds function getSponsorTimeEditTimes(idStartName, index) { - let minutes = document.getElementById(idStartName + "Minutes" + index); - let seconds = document.getElementById(idStartName + "Seconds" + index); + let minutes = document.getElementById(idStartName + chrome.i18n.getMessage("Mins") + index); + let seconds = document.getElementById(idStartName + chrome.i18n.getMessage("Secs") + index); return parseInt(minutes.value) * 60 + parseFloat(seconds.value); } @@ -768,7 +767,7 @@ function runThePopup() { function submitTimes() { //make info message say loading - SB.submitTimesInfoMessage.innerText = "Loading..."; + SB.submitTimesInfoMessage.innerText = chrome.i18n.getMessage("Loading"); SB.submitTimesInfoMessageContainer.style.display = "unset"; if (sponsorTimes.length > 0) { @@ -950,7 +949,7 @@ function runThePopup() { //update startTimeChosen letiable if (!startTimeChosen) { startTimeChosen = true; - SB.sponsorStart.innerHTML = chrome.i18n.getMessage("SponsorEND"); + SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEND"); } else { resetStartTimeChosen(); } @@ -982,7 +981,7 @@ function runThePopup() { //this is not a YouTube video page function displayNoVideo() { - document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("Sponsor404"); + document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("sponsor404"); } function reportAnIssue() { @@ -1019,13 +1018,13 @@ function runThePopup() { //see if it was a success or failure if (response.successType == 1) { //success - addVoteMessage(chrome.i18n.getMessage("VOTED"), UUID) + addVoteMessage(chrome.i18n.getMessage("Voted"), UUID) } else if (response.successType == 0) { //failure: duplicate vote - addVoteMessage(chrome.i18n.getMessage("VOTE_FAIL"), UUID) + addVoteMessage(chrome.i18n.getMessage("voteFAIL"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { - addVoteMessage(chrome.i18n.getMessage("ServerDown"), UUID) + addVoteMessage(chrome.i18n.getMessage("serverDown"), UUID) } else { //failure: unknown error addVoteMessage(chrome.i18n.getMessage("connectionError") + response.statusCode, UUID) From e141b1f4e8458fe0fd64930f593e4747e793c0a9 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 22:28:41 +0100 Subject: [PATCH 34/53] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 21c293ec..c121f6ef 100644 --- a/manifest.json +++ b/manifest.json @@ -43,7 +43,7 @@ ], "browser_action": { "default_title": "__MSG_Name__", - "default_popup": "__MSG_popup__" + "default_popup": "__MSG_Popup__" }, "background": { "scripts":[ From e8246a9a8aa561fc525a68a328a72e06cc279aa2 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Mon, 12 Aug 2019 22:29:15 +0100 Subject: [PATCH 35/53] Added new stuff --- _locales/en/messages.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index be5d528e..78b12c19 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -45,6 +45,15 @@ "Dismiss": { "message": "Dismiss" }, + "Loading": { + "message": "Loading..." + }, + "Mins": { + "message": "Minutes" + }, + "Secs": { + "message": "Seconds" + }, "Hide": { "message": "Don't Show This Again" }, From fadb294c98a82efb81bf6b7213028c7456af5dbf Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 14:05:32 -0400 Subject: [PATCH 36/53] Made the preview bar only get created if a video is found. --- content.js | 12 ++++++++---- manifest.json | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/content.js b/content.js index 868c8ddf..690bb77e 100644 --- a/content.js +++ b/content.js @@ -25,10 +25,9 @@ var channelURL; var channelWhitelisted = false; // create preview bar -let progressBar = document.getElementsByClassName("ytp-progress-bar-container")[0] || document.getElementsByClassName("no-model cue-range-markers")[0]; -var previewBar = new PreviewBar(progressBar); +var previewBar; -if(id = getYouTubeVideoID(document.URL)){ // Direct Links +if (id = getYouTubeVideoID(document.URL)) { // Direct Links videoIDChange(id); } @@ -203,10 +202,15 @@ document.onkeydown = function(e){ } function videoIDChange(id) { - //not a url change if (sponsorVideoID == id) return; + if (previewBar == null) { + //create it + let progressBar = document.getElementsByClassName("ytp-progress-bar-container")[0] || document.getElementsByClassName("no-model cue-range-markers")[0]; + previewBar = new PreviewBar(progressBar); + } + //warn them if they had unsubmitted times if (previousVideoID != null) { //get the sponsor times from storage diff --git a/manifest.json b/manifest.json index d71a7f4b..5b7847c6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "SponsorBlock for YouTube - Skip Sponsorships", "short_name": "SponsorBlock", - "version": "1.0.35", + "version": "1.0.36", "description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.", "content_scripts": [ { From 60fc61560d6cb581654497abf0b9a78500223e1d Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 14:39:20 -0400 Subject: [PATCH 37/53] Added leaderboard link --- popup.css | 4 ++++ popup.html | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/popup.css b/popup.css index 1d5dd91e..ae3f79dc 100644 --- a/popup.css +++ b/popup.css @@ -51,6 +51,10 @@ h1.popupElement { padding: 5px; } +.discreteLink.popupElement { + color: black; +} + .recordingSubtitle.popupElement { margin-bottom: 10px; } diff --git a/popup.html b/popup.html index 0c829494..039db0e2 100644 --- a/popup.html +++ b/popup.html @@ -73,6 +73,10 @@ sponsor segments. + +
+ View the leaderboard here. +

From f350f181909f00255c147b192421284bfb0c56a7 Mon Sep 17 00:00:00 2001 From: OfficialNoob Date: Tue, 13 Aug 2019 22:05:39 +0100 Subject: [PATCH 38/53] Fixed code problems --- background.js | 2 +- content.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/background.js b/background.js index 2f6e304d..c5927143 100644 --- a/background.js +++ b/background.js @@ -56,7 +56,7 @@ chrome.runtime.onInstalled.addListener(function (object) { if (!shownInstallPage){ //open up the install page - chrome.tabs.create({url: chrome.extension.getURL("/help/"+chrome.i18n.getMessage("helpPage")}); + chrome.tabs.create({url: chrome.extension.getURL("/help/"+chrome.i18n.getMessage("helpPage"))}); } // TODO (shownInstallPage): delete if statement and contents diff --git a/content.js b/content.js index 265e1a41..5d433620 100644 --- a/content.js +++ b/content.js @@ -990,9 +990,8 @@ function vote(type, UUID) { addLoadingInfo(chrome.i18n.getMessage("serverDown"), UUID) } else { //failure: unknown error - addLoadingInfo((chrome.i18n.getMessage("connectionError") + response.statusCode, UUID) + addLoadingInfo(chrome.i18n.getMessage("connectionError") + response.statusCode, UUID); } - } } }); From 57f076c5d3cd642fc800f8f84f9e526b570fcf01 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 18:40:46 -0400 Subject: [PATCH 39/53] Removed debug log --- content.js | 1 - 1 file changed, 1 deletion(-) diff --git a/content.js b/content.js index ed578fc7..6495aed9 100644 --- a/content.js +++ b/content.js @@ -329,7 +329,6 @@ function sponsorsLookup(id) { //update the preview bar //leave the type blank for now until categories are added - console.log(v.duration) if (isNaN(v.duration)) { //wait until it is loaded v.addEventListener('durationchange', updatePreviewBar); From d89238f76bdf7fcd3264bf06114582a604dee514 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 18:44:47 -0400 Subject: [PATCH 40/53] Changed to not change popup HTML file based on language --- _locales/en/messages.json | 3 --- manifest.json | 2 +- popup_en.html => popup.html | 0 3 files changed, 1 insertion(+), 4 deletions(-) rename popup_en.html => popup.html (100%) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 78b12c19..f29c36f8 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -105,8 +105,5 @@ }, "leftTimes": { "message": "You seem to have left some sponsor times unsubmitted. Go back to that page to submit them (they are not deleted)." - }, - "Popup": { - "message": "popup_en.html" } } diff --git a/manifest.json b/manifest.json index ab00d1ec..90cdaad3 100644 --- a/manifest.json +++ b/manifest.json @@ -44,7 +44,7 @@ ], "browser_action": { "default_title": "__MSG_Name__", - "default_popup": "__MSG_Popup__" + "default_popup": "popup.html" }, "background": { "scripts":[ diff --git a/popup_en.html b/popup.html similarity index 100% rename from popup_en.html rename to popup.html From 29da12ec71e1df6ea8f9357384ed659960de09b9 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 18:49:55 -0400 Subject: [PATCH 41/53] Updated popup title --- popup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popup.html b/popup.html index 039db0e2..bb5e16cc 100644 --- a/popup.html +++ b/popup.html @@ -1,6 +1,6 @@ - Set Page Color Popup + SponsorBlock Popup From bfd841486ec3baff92e20955d61c1d390746919c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 18:55:50 -0400 Subject: [PATCH 42/53] Fixed incorrect message and changed formatting --- _locales/en/messages.json | 6 +++--- popup.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f29c36f8..7a3e9064 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -82,16 +82,16 @@ "sponsorStart": { "message": "Sponsorship Starts Now" }, - "sponsorEND": { + "sponsorEnd": { "message": "Sponsorship Ends Now" }, - "noVIDEOID": { + "noVideoID": { "message": "This probably isn't a YouTube tab, or you clicked too early. \n If you know this is a YouTube tab,\n close this popup and open it again." }, "Voted": { "message": "Thanks for voting!" }, - "voteFAIL": { + "voteFail": { "message": "You have already voted this way before." }, "serverDown": { diff --git a/popup.js b/popup.js index 76d7dba8..8bf8d020 100644 --- a/popup.js +++ b/popup.js @@ -233,7 +233,7 @@ function runThePopup() { if (sponsorTimesStorage != undefined && sponsorTimesStorage.length > 0) { if (sponsorTimesStorage[sponsorTimesStorage.length - 1] != undefined && sponsorTimesStorage[sponsorTimesStorage.length - 1].length < 2) { startTimeChosen = true; - SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEND"); + SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEnd"); } sponsorTimes = sponsorTimesStorage; @@ -966,7 +966,7 @@ function runThePopup() { //update startTimeChosen letiable if (!startTimeChosen) { startTimeChosen = true; - SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEND"); + SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEnd"); } else { resetStartTimeChosen(); } @@ -1051,7 +1051,7 @@ function runThePopup() { //this is not a YouTube video page function displayNoVideo() { - document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("sponsor404"); + document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("noVideoID"); } function reportAnIssue() { @@ -1091,7 +1091,7 @@ function runThePopup() { addVoteMessage(chrome.i18n.getMessage("Voted"), UUID) } else if (response.successType == 0) { //failure: duplicate vote - addVoteMessage(chrome.i18n.getMessage("voteFAIL"), UUID) + addVoteMessage(chrome.i18n.getMessage("voteFail"), UUID) } else if (response.successType == -1) { if (response.statusCode == 502) { addVoteMessage(chrome.i18n.getMessage("serverDown"), UUID) From 0e4d95dca77d36e9f167698a7a8ff03dfe81f9d5 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 19:18:53 -0400 Subject: [PATCH 43/53] Made preview bar update more and made the sponsor times reset more. --- content.js | 63 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/content.js b/content.js index 6495aed9..a95b473e 100644 --- a/content.js +++ b/content.js @@ -18,6 +18,12 @@ var v; var listenerAdded; +//the video id of the last preview bar update +var lastPreviewBarUpdate; + +//whether the duration listener listening for the duration changes of the video has been setup yet +var durationListenerSetUp = false; + //the channel this video is about var channelURL; @@ -94,7 +100,11 @@ function messageListener(request, sender, sendResponse) { //messages from popup script if (request.message == "update") { - if(id = getYouTubeVideoID(document.URL)) videoIDChange(id); + if(id = getYouTubeVideoID(document.URL)){ + videoIDChange(id); + } else { + resetValues(); + } } if (request.message == "sponsorStart") { @@ -201,6 +211,24 @@ document.onkeydown = function(e){ } } +function resetValues() { + //reset last sponsor times + lastTime = -1; + lastUnixTimeSkipped = -1; + + //reset sponsor times + sponsorTimes = null; + UUIDs = null; + sponsorVideoID = id; + sponsorLookupRetries = 0; + + //empty the preview bar + previewBar.set([], [], 0); + + //reset sponsor data found check + sponsorDataFound = false; +} + function videoIDChange(id) { //not a url change if (sponsorVideoID == id) return; @@ -237,24 +265,11 @@ function videoIDChange(id) { //close popup closeInfoMenu(); - //reset last sponsor times - lastTime = -1; - lastUnixTimeSkipped = -1; - - //reset sponsor times - sponsorTimes = null; - UUIDs = null; - sponsorVideoID = id; - sponsorLookupRetries = 0; - - //empty the preview bar - previewBar.set([], [], 0); + resetValues(); //see if there is a video start time youtubeVideoStartTime = getYouTubeVideoStartTime(document.URL); - //reset sponsor data found check - sponsorDataFound = false; sponsorsLookup(id); //make sure everything is properly added @@ -312,12 +327,18 @@ function videoIDChange(id) { function sponsorsLookup(id) { v = document.querySelector('video') // Youtube video player - //there is no video here if (v == null) { setTimeout(() => sponsorsLookup(id), 100); return; } + + if (!durationListenerSetUp) { + durationListenerSetUp = true; + + //wait until it is loaded + v.addEventListener('durationchange', updatePreviewBar); + } //check database for sponsor times sendRequestToServer('GET', "/api/getVideoSponsorTimes?videoID=" + id, function(xmlhttp) { @@ -329,11 +350,9 @@ function sponsorsLookup(id) { //update the preview bar //leave the type blank for now until categories are added - if (isNaN(v.duration)) { - //wait until it is loaded - v.addEventListener('durationchange', updatePreviewBar); - } else { + if (lastPreviewBarUpdate == id || (lastPreviewBarUpdate == null && !isNaN(v.duration))) { //set it now + //otherwise the listener can handle it updatePreviewBar(); } @@ -374,8 +393,8 @@ function sponsorsLookup(id) { function updatePreviewBar() { previewBar.set(sponsorTimes, [], v.duration); - //the listener is only needed once - v.removeEventListener('durationchange', updatePreviewBar); + //update last video id + lastPreviewBarUpdate = getYouTubeVideoID(document.URL); } function getChannelID() { From b1ce20cd5a877ab783a57caf935c1c7cf9161176 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 13 Aug 2019 23:43:02 -0400 Subject: [PATCH 44/53] Added basic features for the new voting UI --- _locales/en/messages.json | 4 +- content.css | 79 ++++++++++++++++------ content.js | 135 ++++++++++++++++++++++++++++---------- icons/downvote.png | Bin 6513 -> 5251 bytes icons/upvote.png | Bin 6600 -> 5484 bytes 5 files changed, 163 insertions(+), 55 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 7a3e9064..07a5d180 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -55,13 +55,13 @@ "message": "Seconds" }, "Hide": { - "message": "Don't Show This Again" + "message": "Never Show" }, "hitGoBack": { "message": "Hit go back to get to where you came from." }, "goBack": { - "message": "Go back" + "message": "Unskip" }, "confirmMSG": { "message": "\n\nTo edit or delete individual values, click the info button or open the extension popup by clicking the extension icon in the top right corner." diff --git a/content.css b/content.css index c05f2f16..b6d3ceb9 100644 --- a/content.css +++ b/content.css @@ -41,16 +41,16 @@ } .sponsorSkipObject { - font-family: 'Source Sans Pro', sans-serif; + font-family: 'Source Sans Pro', sans-serif; + + margin-left: 2px; + margin-right: 2px; } .sponsorSkipLogo { - height: 64px; - position: absolute; - top: 0; - bottom: 0; - margin: auto; - margin-left: 10px; + height: 18px; + + float: left; } @keyframes fadeIn { @@ -58,17 +58,24 @@ to { opacity: 1; } } +.sponsorBlockSpacer { + border-color: #999999; + background-color: #999999; +} + .sponsorSkipNotice { - min-height: 165px; - min-width: 400px; - background-color: rgba(255, 217, 217, 0.8); + min-width: 300px; + background-color: rgba(0, 0, 0, 0.8); position: absolute; - border: 3px solid rgba(0, 0, 0, 0.8); right: 0; - bottom: 90px; - zoom: 85%; + bottom: 100px; + right: 10px; + + border-radius: 10px; animation: fadeIn 0.5s; + + border-spacing: 7px 7px; } /* if two are very close to eachother */ @@ -78,13 +85,43 @@ transition: bottom 0.2s; } +.sponsorSkipNoticeUnskipSection { + float: left; + + border-left: 1px solid #eeeeee; +} + +.sponsorSkipNoticeRightSection { + right: 0; + position: absolute; + + float: right; +} + +.sponsorSkipNoticeCloseButton { + margin-left: 0px; + margin-right: 0px; + padding: 0px; +} + +.sponsorSkipNoticeButton { + background: none; + color: #ffffff; + border: none; + display: inline-block; + + cursor: pointer; + + margin-left: 10px; + margin-right: 10px; +} + .sponsorSkipMessage { - font-size: 18px; - color: #000000; - text-align: center; - margin-top: 10px; + font-size: 14px; font-weight: bold; - margin-top: 4px; + color: #ffffff; + + display: inline-block; } .sponsorSkipInfo { @@ -119,9 +156,11 @@ } .voteButton { - height: 32px; - margin-right: 15px; + height: 18px; cursor: pointer; + + margin-left: 10px; + margin-right: 10px; } .voteButton:hover { filter: brightness(80%); diff --git a/content.js b/content.js index a95b473e..eab8983c 100644 --- a/content.js +++ b/content.js @@ -870,27 +870,67 @@ function openSkipNotice(UUID){ noticeElement.classList.add("sponsorSkipNotice"); noticeElement.style.zIndex = 50 + amountOfPreviousNotices; + // let logoElement = document.createElement("img"); + // logoElement.id = "sponsorSkipLogo" + UUID; + // logoElement.className = "sponsorSkipLogo"; + // logoElement.src = chrome.extension.getURL("icons/LogoSponsorBlocker256px.png"); + + // let noticeMessage = document.createElement("div"); + // noticeMessage.id = "sponsorSkipMessage" + UUID; + // noticeMessage.classList.add("sponsorSkipMessage"); + // noticeMessage.classList.add("sponsorSkipObject"); + // noticeMessage.innerText = "Hey, you just skipped a sponsor!"; + + // let noticeInfo = document.createElement("p"); + // noticeInfo.id = "sponsorSkipInfo" + UUID; + // noticeInfo.classList.add("sponsorSkipInfo"); + // noticeInfo.classList.add("sponsorSkipObject"); + // noticeInfo.innerText = "This message will disapear in 7 seconds"; + + //the row that will contain the info + let firstRow = document.createElement("tr"); + + let logoColumn = document.createElement("td"); + let logoElement = document.createElement("img"); logoElement.id = "sponsorSkipLogo" + UUID; - logoElement.className = "sponsorSkipLogo"; - logoElement.src = chrome.extension.getURL("icons/LogoSponsorBlocker256px.png"); + logoElement.className = "sponsorSkipLogo sponsorSkipObject"; + logoElement.src = chrome.extension.getURL("icons/IconSponsorBlocker256px.png"); - let noticeMessage = document.createElement("div"); + let noticeMessage = document.createElement("span"); noticeMessage.id = "sponsorSkipMessage" + UUID; noticeMessage.classList.add("sponsorSkipMessage"); noticeMessage.classList.add("sponsorSkipObject"); - noticeMessage.innerText = "Hey, you just skipped a sponsor!"; - - let noticeInfo = document.createElement("p"); - noticeInfo.id = "sponsorSkipInfo" + UUID; - noticeInfo.classList.add("sponsorSkipInfo"); - noticeInfo.classList.add("sponsorSkipObject"); - noticeInfo.innerText = "This message will disapear in 7 seconds"; + noticeMessage.innerText = "SponsorBlock - Sponsor Skipped"; + + //create the first column + logoColumn.appendChild(logoElement); + logoColumn.appendChild(noticeMessage); + + //add the x button + let closeButtonContainer = document.createElement("td"); + closeButtonContainer.className = "sponsorSkipNoticeRightSection" + + let hideButton = document.createElement("button"); + hideButton.innerText = "X"; + hideButton.className = "sponsorSkipNoticeButton sponsorSkipNoticeCloseButton"; + hideButton.addEventListener("click", () => closeSkipNotice(UUID)); + + closeButtonContainer.appendChild(hideButton); + + //add all objects to first row + firstRow.appendChild(logoColumn); + firstRow.appendChild(closeButtonContainer); + + let spacer = document.createElement("hr"); + spacer.className = "sponsorBlockSpacer"; + + //the row that will contain the buttons + let secondRow = document.createElement("tr"); //thumbs up and down buttons - let voteButtonsContainer = document.createElement("div"); + let voteButtonsContainer = document.createElement("td"); voteButtonsContainer.id = "sponsorTimesVoteButtonsContainer" + UUID; - voteButtonsContainer.setAttribute("align", "center"); let upvoteButton = document.createElement("img"); upvoteButton.id = "sponsorTimesUpvoteButtonsContainer" + UUID; @@ -908,35 +948,64 @@ function openSkipNotice(UUID){ voteButtonsContainer.appendChild(upvoteButton); voteButtonsContainer.appendChild(downvoteButton); - let buttonContainer = document.createElement("div"); - buttonContainer.setAttribute("align", "center"); + //add unskip button + let unskipContainer = document.createElement("td"); + unskipContainer.className = "sponsorSkipNoticeUnskipSection"; - let goBackButton = document.createElement("button"); - goBackButton.innerText = chrome.i18n.getMessage("goBack"); - goBackButton.className = "sponsorSkipButton"; - goBackButton.addEventListener("click", () => goBackToPreviousTime(UUID)); + let unskipButton = document.createElement("button"); + unskipButton.innerText = chrome.i18n.getMessage("goBack"); + unskipButton.className = "sponsorSkipNoticeButton"; + unskipButton.addEventListener("click", () => goBackToPreviousTime(UUID)); - let hideButton = document.createElement("button"); - hideButton.innerText = chrome.i18n.getMessage("Dismiss"); - hideButton.className = "sponsorSkipButton"; - hideButton.addEventListener("click", () => closeSkipNotice(UUID)); + unskipContainer.appendChild(unskipButton); + + //add don't show again button + let dontshowContainer = document.createElement("td"); + dontshowContainer.className = "sponsorSkipNoticeRightSection"; let dontShowAgainButton = document.createElement("button"); dontShowAgainButton.innerText = chrome.i18n.getMessage("Hide"); - dontShowAgainButton.className = "sponsorSkipDontShowButton"; + dontShowAgainButton.className = "sponsorSkipNoticeButton sponsorSkipNoticeCloseButton"; dontShowAgainButton.addEventListener("click", dontShowNoticeAgain); - buttonContainer.appendChild(goBackButton); - buttonContainer.appendChild(hideButton); - buttonContainer.appendChild(document.createElement("br")); - buttonContainer.appendChild(document.createElement("br")); - buttonContainer.appendChild(dontShowAgainButton); + dontshowContainer.appendChild(dontShowAgainButton); - noticeElement.appendChild(logoElement); - noticeElement.appendChild(noticeMessage); - noticeElement.appendChild(noticeInfo); - noticeElement.appendChild(voteButtonsContainer); - noticeElement.appendChild(buttonContainer); + //add to row + secondRow.appendChild(voteButtonsContainer); + secondRow.appendChild(unskipContainer); + secondRow.appendChild(dontshowContainer); + + // let buttonContainer = document.createElement("div"); + // buttonContainer.setAttribute("align", "center"); + + // let goBackButton = document.createElement("button"); + // goBackButton.innerText = chrome.i18n.getMessage("goBack"); + // goBackButton.className = "sponsorSkipButton"; + // goBackButton.addEventListener("click", () => goBackToPreviousTime(UUID)); + + // let hideButton = document.createElement("button"); + // hideButton.innerText = chrome.i18n.getMessage("Dismiss"); + // hideButton.className = "sponsorSkipButton"; + // hideButton.addEventListener("click", () => closeSkipNotice(UUID)); + + // let dontShowAgainButton = document.createElement("button"); + // dontShowAgainButton.innerText = chrome.i18n.getMessage("Hide"); + // dontShowAgainButton.className = "sponsorSkipDontShowButton"; + // dontShowAgainButton.addEventListener("click", dontShowNoticeAgain); + + // buttonContainer.appendChild(goBackButton); + // buttonContainer.appendChild(hideButton); + // buttonContainer.appendChild(document.createElement("br")); + // buttonContainer.appendChild(document.createElement("br")); + // buttonContainer.appendChild(dontShowAgainButton); + + // noticeElement.appendChild(logoElement); + // noticeElement.appendChild(noticeMessage); + // noticeElement.appendChild(noticeInfo); + + noticeElement.appendChild(firstRow); + noticeElement.appendChild(spacer); + noticeElement.appendChild(secondRow); let referenceNode = document.getElementById("movie_player"); if (referenceNode == null) { diff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@j;*5GMH33hY&!tzdeM8@={g4|y17c50 zfZ1^(M%n_8^GNB`R77C|TeK8!4^;jW?-Ywl^#zPui;6MuHhNfdF>>Y$nVV2f1gq__ zx`2I11;&=f`qAL&1%JieW4o4xw}2ktrWA|xq%lO#sh71PEp!3*vpDeA*2*d}B)uO; zJxf>u2mjeDho+i<^A|KjHFe$xpGMvYW+hn$a}s&Mb<1ptt6n6*AMo(x*sXLDKC(FL z22z9@4l|~~UcKMNyWpj~YYRWW!k)A}j9bJY~iY*8(sk!&pQ7;FnmkD+&oOM4^ zW>n25m%mYQ>55QXw#8AY=94NVpSTRCtv*X93aS8`pFjy)&_$kbRE`$cJc6wJI4Pc^ zCULnIA3jbq4TfWJLIe|6h$l_2Hv*JJ$5FB7_yDxN3KnPEmBbMBa8@OwKm?(-O%7zQ zglneVzEQ1pi?b3~`hx?P>{}JLJD;cE=kL;>(MJ4z_oS7u?JWtmubd;c?2t^HA48OI zwgMEcfA?o1_X}vH>Blum)}AP~?C3U7*RhIx!@Fw63BhG2e+TLz-R>sTpuL8VuZuA# z)D^KU=^mgmHGO8}dvg#L*C;DNZ6#`t^I#+Xjh57oxCZq1D8kijC=R`1)y-i%4gMnn*kJ7~Do*0#{|AnNAp-ya diff --git a/icons/upvote.png b/icons/upvote.png index 56eb5c5b86886cc06dd95188866649af5d653230..30023f95b5c6c7b8f908734fa7a65d532668ec0c 100644 GIT binary patch literal 5484 zcmYjVcU%+c)_xNLQq%xSM}kzPMNz>*mxL-sxGE^spkM(-t~4P5RHWB{E}f|00v3!S zN(rzi0W|~_ENp^6mLMHNs7byFyWai&$ZvA`InOy~=AB7#bFtebsVoTq*yLbudlUc| z^cS{4TnxHcN8V;Y7sOfXBh~;s$&y+N5QS)oOZHw@01)3M{J{#FBQzkUVg%+ygh$w! zh{%BOAaE%lBs9V(G$=xSuhDKJ6P}9%8-T4p9Bi#UqkN}IVn0R%c_p*7HnfQ((@u*A zhr1=%dZZ$01!pSnYbi?=r0pUbgvZ(6j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about the username --- popup.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/popup.html b/popup.html index bb5e16cc..b9affd64 100644 --- a/popup.html +++ b/popup.html @@ -123,6 +123,10 @@
+
+ + This is used on the public stats page to show off how much you've contributed. See it here. +