From d93d475c1fcdc78fc1ceb63f572c0d2a2f375208 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 29 Jul 2019 21:09:10 -0400 Subject: [PATCH] Added error messages to video player submission. --- content.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); + } } } });