try to fix this spaghetti of a code

This commit is contained in:
Frederik Spirgi
2026-09-09 11:02:31 +02:00
parent c0eb11c8d4
commit 45eef9ef5c
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -45,11 +45,11 @@ window.RealtimeClient = class extends EventTarget {
}
this.dispatchEvent(new CustomEvent('message', {detail: message}));
});
socket.addEventListener('error', () => this.status('Connection interrupted. Reconnecting…'));
socket.addEventListener('error', () => this.status('Connection interrupted. Reconnecting...'));
socket.addEventListener('close', async event => {
clearTimeout(timeout); this.ready = false;
if (this.stopped) return;
this.status('Connection interrupted. Reconnecting…');
this.status('Connection interrupted. Reconnecting...');
if (event.code === 1008 && /Session/.test(event.reason)) {
this.close(); localStorage.removeItem('activeLobbyId'); location.assign('/login'); return;
}
+1 -1
View File
@@ -101,7 +101,7 @@ document.addEventListener("DOMContentLoaded", () => {
if (winner) {
const heading = document.createElement("h2");
heading.textContent = `Winner: ${winner}`;
heading.textContent = `Payout recipients: ${winner}`;
showdownPanel.appendChild(heading);
}