mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +03:00
Give the user error messages from the server.
Helps with https://github.com/ajayyy/SponsorBlockServer/pull/70
This commit is contained in:
@@ -218,9 +218,12 @@ async function submitTimes(videoID: string, callback) {
|
||||
+ "&userID=" + userID, function(xmlhttp, error) {
|
||||
if (xmlhttp.readyState == 4 && !error) {
|
||||
callback({
|
||||
statusCode: xmlhttp.status
|
||||
statusCode: xmlhttp.status,
|
||||
responseText: xmlhttp.responseText
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (xmlhttp.status == 200) {
|
||||
//save the amount contributed
|
||||
if (!increasedContributionAmount) {
|
||||
|
||||
@@ -1467,7 +1467,7 @@ function sendSubmitMessage(){
|
||||
document.getElementById("submitButton").style.animation = "unset";
|
||||
(<HTMLImageElement> document.getElementById("submitImage")).src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker256px.png");
|
||||
|
||||
alert(utils.getErrorMessage(response.statusCode));
|
||||
alert(utils.getErrorMessage(response.statusCode) + "\n\n" + response.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user