summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-07 16:51:46 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commitf882ef1e282191424ffad024df64694e9423def2 (patch)
tree86e3c16f8ed2acd52999a896b15eb1c14dda9cc4 /play.js
parentc90f1e3a43709736d7a61c517e94f19b2dff8e8e (diff)
downloadplantagenet-f882ef1e282191424ffad024df64694e9423def2.tar.gz
dynamic favicons based on player role
TODO: ... based on current heir
Diffstat (limited to 'play.js')
-rw-r--r--play.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/play.js b/play.js
index aa4a352..58054a7 100644
--- a/play.js
+++ b/play.js
@@ -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] = []