mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-10 00:48:32 +01:00
reset color on bad request
This commit is contained in:
@@ -113,6 +113,7 @@ function balance(){
|
|||||||
|
|
||||||
cont = document.getElementById("response-container")
|
cont = document.getElementById("response-container")
|
||||||
cont.innerHTML = ""
|
cont.innerHTML = ""
|
||||||
|
cont.style.color = "black";
|
||||||
sides = ["left", "right"]
|
sides = ["left", "right"]
|
||||||
|
|
||||||
blue = [ "", "", "", "", ""]
|
blue = [ "", "", "", "", ""]
|
||||||
@@ -169,6 +170,10 @@ function balance(){
|
|||||||
}).then(r => r.json()).then(j => {
|
}).then(r => r.json()).then(j => {
|
||||||
spinner.style.display = "none";
|
spinner.style.display = "none";
|
||||||
cont.innerHTML = j["content"]
|
cont.innerHTML = j["content"]
|
||||||
|
}).catch(err => {
|
||||||
|
spinner.style.display = "none";
|
||||||
|
cont.style.color = "red";
|
||||||
|
cont.innerHTML = "Error - request failed."
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user