aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-07-29 21:09:10 -0400
committerAjay Ramachandran <[email protected]>2019-07-29 21:09:10 -0400
commitd93d475c1fcdc78fc1ceb63f572c0d2a2f375208 (patch)
tree88d6f4f9df8418ecf8cbaecfa9d184d9e7a40b66
parent0d0b91910695ba5a4fb144e986c6f39053e168ad (diff)
downloadSponsorBlock-d93d475c1fcdc78fc1ceb63f572c0d2a2f375208.tar.gz
SponsorBlock-d93d475c1fcdc78fc1ceb63f572c0d2a2f375208.zip
Added error messages to video player submission.
-rw-r--r--content.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/content.js b/content.js
index 381a0932..b4f9fbdb 100644
--- a/content.js
+++ b/content.js
@@ -817,6 +817,18 @@ function sendSubmitMessage(){
//show that the upload failed
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);
+ } else {
+ alert("There was an error submitting your sponsor times, please try again later. Error code " + response.statusCode);
+ }
}
}
});