Fixed incorrect message and changed formatting

This commit is contained in:
Ajay Ramachandran
2019-08-13 18:55:50 -04:00
parent 29da12ec71
commit bfd841486e
2 changed files with 7 additions and 7 deletions

View File

@@ -82,16 +82,16 @@
"sponsorStart": { "sponsorStart": {
"message": "Sponsorship Starts Now" "message": "Sponsorship Starts Now"
}, },
"sponsorEND": { "sponsorEnd": {
"message": "Sponsorship Ends Now" "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." "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!" "message": "Thanks for voting!"
}, },
"voteFAIL": { "voteFail": {
"message": "You have already voted this way before." "message": "You have already voted this way before."
}, },
"serverDown": { "serverDown": {

View File

@@ -233,7 +233,7 @@ function runThePopup() {
if (sponsorTimesStorage != undefined && sponsorTimesStorage.length > 0) { if (sponsorTimesStorage != undefined && sponsorTimesStorage.length > 0) {
if (sponsorTimesStorage[sponsorTimesStorage.length - 1] != undefined && sponsorTimesStorage[sponsorTimesStorage.length - 1].length < 2) { if (sponsorTimesStorage[sponsorTimesStorage.length - 1] != undefined && sponsorTimesStorage[sponsorTimesStorage.length - 1].length < 2) {
startTimeChosen = true; startTimeChosen = true;
SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEND"); SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEnd");
} }
sponsorTimes = sponsorTimesStorage; sponsorTimes = sponsorTimesStorage;
@@ -966,7 +966,7 @@ function runThePopup() {
//update startTimeChosen letiable //update startTimeChosen letiable
if (!startTimeChosen) { if (!startTimeChosen) {
startTimeChosen = true; startTimeChosen = true;
SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEND"); SB.sponsorStart.innerHTML = chrome.i18n.getMessage("sponsorEnd");
} else { } else {
resetStartTimeChosen(); resetStartTimeChosen();
} }
@@ -1051,7 +1051,7 @@ function runThePopup() {
//this is not a YouTube video page //this is not a YouTube video page
function displayNoVideo() { function displayNoVideo() {
document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("sponsor404"); document.getElementById("loadingIndicator").innerHTML = chrome.i18n.getMessage("noVideoID");
} }
function reportAnIssue() { function reportAnIssue() {
@@ -1091,7 +1091,7 @@ function runThePopup() {
addVoteMessage(chrome.i18n.getMessage("Voted"), UUID) addVoteMessage(chrome.i18n.getMessage("Voted"), UUID)
} else if (response.successType == 0) { } else if (response.successType == 0) {
//failure: duplicate vote //failure: duplicate vote
addVoteMessage(chrome.i18n.getMessage("voteFAIL"), UUID) addVoteMessage(chrome.i18n.getMessage("voteFail"), UUID)
} else if (response.successType == -1) { } else if (response.successType == -1) {
if (response.statusCode == 502) { if (response.statusCode == 502) {
addVoteMessage(chrome.i18n.getMessage("serverDown"), UUID) addVoteMessage(chrome.i18n.getMessage("serverDown"), UUID)