From 57a65847177425776c348da5fa82eec4afeee608 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 6 Oct 2022 13:37:16 +0200 Subject: Fix display of presence. --- play.html | 11 +++-------- play.js | 4 +++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/play.html b/play.html index fec2cc9..05bd896 100644 --- a/play.html +++ b/play.html @@ -26,16 +26,11 @@
diff --git a/play.js b/play.js index 7de586f..cc65b47 100644 --- a/play.js +++ b/play.js @@ -648,7 +648,9 @@ function on_update() { ui.player[p].prize.textContent = view.players[p].prizes + " prizes" } - ui.player[p].role.className = "role " + view.players[p].loyalty; + ui.player[p].role.classList.toggle("Afghan", view.players[p].loyalty == "Afghan") + ui.player[p].role.classList.toggle("British", view.players[p].loyalty == "British") + ui.player[p].role.classList.toggle("Russian", view.players[p].loyalty == "Russian") ui.player[p].role.classList.toggle("active", p === player_index[view.active]) let a = "" -- cgit v1.2.3