diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-07 16:51:46 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | f882ef1e282191424ffad024df64694e9423def2 (patch) | |
tree | 86e3c16f8ed2acd52999a896b15eb1c14dda9cc4 /play.js | |
parent | c90f1e3a43709736d7a61c517e94f19b2dff8e8e (diff) | |
download | plantagenet-f882ef1e282191424ffad024df64694e9423def2.tar.gz |
dynamic favicons based on player role
TODO: ... based on current heir
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -558,6 +558,7 @@ let expand_calendar = -1 let expand_track = -1 const ui = { + favicon: document.getElementById("favicon"), locale: [], locale_name: [], locale_markers: [], @@ -1460,6 +1461,18 @@ function update_vassals() { function on_update() { restart_cache() + switch (player) { + case "York": + ui.favicon.href = "favicons/favicon_york.png" + break + case "Lancaster": + ui.favicon.href = "favicons/favicon_henry_vi.png" + break + default: + ui.favicon.href = "favicons/favicon_warwick.png" + break + } + for (let i = 0; i <= 16; ++i) { calendar_layout_cylinder[i] = [] calendar_layout_vassal[i] = [] |