diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-29 21:09:10 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2019-07-29 21:09:10 -0400 |
commit | d93d475c1fcdc78fc1ceb63f572c0d2a2f375208 (patch) | |
tree | 88d6f4f9df8418ecf8cbaecfa9d184d9e7a40b66 | |
parent | 0d0b91910695ba5a4fb144e986c6f39053e168ad (diff) | |
download | SponsorBlock-d93d475c1fcdc78fc1ceb63f572c0d2a2f375208.tar.gz SponsorBlock-d93d475c1fcdc78fc1ceb63f572c0d2a2f375208.zip |
Added error messages to video player submission.
-rw-r--r-- | content.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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); + } } } }); |