mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 21:17:20 +03:00
Moving into LANG
This commit is contained in:
14
popup.js
14
popup.js
@@ -82,15 +82,6 @@ function runThePopup() {
|
|||||||
SB.reportAnIssue.addEventListener("click", reportAnIssue);
|
SB.reportAnIssue.addEventListener("click", reportAnIssue);
|
||||||
SB.hideDiscordButton.addEventListener("click", hideDiscordButton);
|
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
|
//if true, the button now selects the end time
|
||||||
let startTimeChosen = false;
|
let startTimeChosen = false;
|
||||||
|
|
||||||
@@ -698,11 +689,6 @@ function runThePopup() {
|
|||||||
resetStartTimeChosen();
|
resetStartTimeChosen();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getErrorMessage(lang, statusCode) {
|
|
||||||
if(lang.has(statusCode)) return lang.get(statusCode);
|
|
||||||
return lang.get('Unknown').concat(" Error code: ") + statusCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
function submitTimes() {
|
function submitTimes() {
|
||||||
//make info message say loading
|
//make info message say loading
|
||||||
SB.submitTimesInfoMessage.innerText = "Loading...";
|
SB.submitTimesInfoMessage.innerText = "Loading...";
|
||||||
|
|||||||
Reference in New Issue
Block a user