summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.html11
-rw-r--r--play.js4
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 @@
<div class="menu">
<div class="menu_title"><img src="/images/cog.svg"></div>
<div class="menu_popup">
- <div class="menu_item" onclick="window.open('info/rules.html', '_blank')">Rules</div>
- <div class="menu_item" onclick="window.open('info/pac.html', '_blank')">Player Aid</div>
- <div class="menu_item" onclick="window.open('info/cards.html', '_blank')">Cards</div>
+ <a class="menu_item" href="info/rules.html" target="_blank")">Rules</a>
+ <a class="menu_item" href="info/pac.html" target="_blank")">Player Aid</a>
+ <a class="menu_item" href="info/cards.html" target="_blank")">Cards</a>
<div class="resign menu_separator"></div>
<div class="resign menu_item" onclick="confirm_resign()">Resign</div>
- <div class="debug menu_separator"></div>
- <div class="debug menu_item" onclick="send_save()">&#x1F41E; Save</div>
- <div class="debug menu_item" onclick="send_restore()">&#x1F41E; Restore</div>
- <div class="debug menu_separator"></div>
- <div class="debug menu_item" onclick="send_restart('2P')">&#x26a0; Restart</div>
</div>
</div>
<div class="icon_button" onclick="toggle_log()"><img src="/images/scroll-quill.svg"></div>
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 = ""