From 27a878b6199593ad13197e142f359c93520b4796 Mon Sep 17 00:00:00 2001 From: Brandan <32969563+dfault-user@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:27:38 -0500 Subject: [PATCH] make it actually work this time todo: 'you have a turn' text doesn't move chat --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 083afb6..1c22d81 100644 --- a/src/index.js +++ b/src/index.js @@ -171,6 +171,7 @@ class CollabVMClient { buttons.takeTurn.innerText = "Take Turn"; turn = -1; turnstatus.innerText = ""; + display.className = ""; // Get the number of users queued for a turn var queuedUsers = Number(msgArr[2]); if (queuedUsers === 0) return; @@ -182,7 +183,7 @@ class CollabVMClient { if (currentTurnUsername === window.username) { turn = 0; turnstatus.innerText = "You have the turn."; - display.class = "focused"; + display.className = "focused"; } // Highlight all waiting users and set their status if (queuedUsers > 1) { @@ -190,7 +191,7 @@ class CollabVMClient { if (window.username === msgArr[i+3]) { turn = i; turnstatus.innerText = "Waiting for turn"; - display.class="waiting"; + display.className="waiting"; }; var user = users.find(u => u.username === msgArr[i+3]); user.turn = i;