Skip to content

Commit

Permalink
Make background red if connection drops
Browse files Browse the repository at this point in the history
  • Loading branch information
h3ndrk authored Dec 3, 2023
1 parent ac31cbb commit 7051bb6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/kiosk.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Recommender {

this.webSocket = new WebSocket(url);
this.webSocket.addEventListener("close", () => {
document.body.style.setProperty("background-color", "red");
alert("Server connection disconnected, please reload");
});
this.webSocket.addEventListener("message", (event) => {
Expand Down

0 comments on commit 7051bb6

Please sign in to comment.