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] 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 +}