diff options
Diffstat (limited to 'popup.js')
-rw-r--r-- | popup.js | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -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) } } } |