From fc1688b688c77d8ff11db45f51855ccce6e74a3a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 19 Nov 2021 02:51:19 +0100 Subject: Keep updates active on join page (for shared role games). --- public/join.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/join.js b/public/join.js index f79eabc..6828ca6 100644 --- a/public/join.js +++ b/public/join.js @@ -60,7 +60,7 @@ function start_event_source() { evtsrc.addEventListener("game", function (evt) { console.log("GAME:", evt.data); game = JSON.parse(evt.data); - if (game.status > 0) { + if (game.status > 1) { clearInterval(timer); evtsrc.close(); } @@ -147,7 +147,7 @@ function update() { window.onload = function () { update(); - if (game.status === 0) { + if (game.status < 2) { start_event_source(); timer = setInterval(start_event_source, 15000); } -- cgit v1.2.3