mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-09 08:28: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.innerHTML = ""
|
||||
cont.style.color = "black";
|
||||
sides = ["left", "right"]
|
||||
|
||||
blue = [ "", "", "", "", ""]
|
||||
@@ -169,6 +170,10 @@ function balance(){
|
||||
}).then(r => r.json()).then(j => {
|
||||
spinner.style.display = "none";
|
||||
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