diff options
-rw-r--r-- | play.html | 2 | ||||
-rw-r--r-- | play.js | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -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> @@ -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) |