summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.html2
-rw-r--r--play.js6
2 files changed, 7 insertions, 1 deletions
diff --git a/play.html b/play.html
index 57517ee..bfa01a0 100644
--- a/play.html
+++ b/play.html
@@ -6,7 +6,7 @@
<meta name="theme-color" content="#444">
<meta charset="UTF-8">
<title>VOTES FOR WOMEN</title>
-<link rel="icon" href="favicon.svg">
+<link id="favicon" rel="icon" href="images/badge1.png">
<link rel="stylesheet" href="/fonts/fonts.css">
<link rel="stylesheet" href="/common/client.css">
<script defer src="/common/client.js"></script>
diff --git a/play.js b/play.js
index 482a2c4..10c3b84 100644
--- a/play.js
+++ b/play.js
@@ -31,6 +31,7 @@ const green_check_count = 36
const red_x_count = 13
let ui = {
+ favicon: document.getElementById("favicon"),
status: document.getElementById("status"),
turn: document.getElementById("turn"),
congress_box: document.getElementById("congress_box"),
@@ -635,6 +636,11 @@ function layout_cubes(list, xorig, yorig) {
function on_update() { // eslint-disable-line no-unused-vars
console.log("VIEW", view)
+ switch (player) {
+ case SUF_NAME: ui.favicon.href = "images/badge1.png"; break
+ case OPP_NAME: ui.favicon.href = "images/badge5.png"; break
+ }
+
ui.player[SUF].classList.toggle("active", view.active === SUF_NAME)
ui.player[OPP].classList.toggle("active", view.active === OPP_NAME)