From f882ef1e282191424ffad024df64694e9423def2 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 7 Oct 2023 16:51:46 +0200 Subject: dynamic favicons based on player role TODO: ... based on current heir --- favicon.png | Bin 17081 -> 0 bytes favicon_henry_vi.png | Bin 11353 -> 0 bytes favicon_march.png | Bin 14779 -> 0 bytes favicon_margaret.png | Bin 11615 -> 0 bytes favicon_york.png | Bin 14112 -> 0 bytes favicons/favicon_henry_vi.png | Bin 0 -> 11353 bytes favicons/favicon_march.png | Bin 0 -> 14779 bytes favicons/favicon_margaret.png | Bin 0 -> 11615 bytes favicons/favicon_warwick.png | Bin 0 -> 14943 bytes favicons/favicon_york.png | Bin 0 -> 14112 bytes play.html | 2 +- play.js | 13 +++++++++++++ 12 files changed, 14 insertions(+), 1 deletion(-) delete mode 100644 favicon.png delete mode 100644 favicon_henry_vi.png delete mode 100644 favicon_march.png delete mode 100644 favicon_margaret.png delete mode 100644 favicon_york.png create mode 100644 favicons/favicon_henry_vi.png create mode 100644 favicons/favicon_march.png create mode 100644 favicons/favicon_margaret.png create mode 100644 favicons/favicon_warwick.png create mode 100644 favicons/favicon_york.png diff --git a/favicon.png b/favicon.png deleted file mode 100644 index fbe6ddb..0000000 Binary files a/favicon.png and /dev/null differ diff --git a/favicon_henry_vi.png b/favicon_henry_vi.png deleted file mode 100644 index 3d7b22c..0000000 Binary files a/favicon_henry_vi.png and /dev/null differ diff --git a/favicon_march.png b/favicon_march.png deleted file mode 100644 index c6225ad..0000000 Binary files a/favicon_march.png and /dev/null differ diff --git a/favicon_margaret.png b/favicon_margaret.png deleted file mode 100644 index 3d9bc1c..0000000 Binary files a/favicon_margaret.png and /dev/null differ diff --git a/favicon_york.png b/favicon_york.png deleted file mode 100644 index 0ffb8be..0000000 Binary files a/favicon_york.png and /dev/null differ diff --git a/favicons/favicon_henry_vi.png b/favicons/favicon_henry_vi.png new file mode 100644 index 0000000..3d7b22c Binary files /dev/null and b/favicons/favicon_henry_vi.png differ diff --git a/favicons/favicon_march.png b/favicons/favicon_march.png new file mode 100644 index 0000000..c6225ad Binary files /dev/null and b/favicons/favicon_march.png differ diff --git a/favicons/favicon_margaret.png b/favicons/favicon_margaret.png new file mode 100644 index 0000000..3d9bc1c Binary files /dev/null and b/favicons/favicon_margaret.png differ diff --git a/favicons/favicon_warwick.png b/favicons/favicon_warwick.png new file mode 100644 index 0000000..1baf53c Binary files /dev/null and b/favicons/favicon_warwick.png differ diff --git a/favicons/favicon_york.png b/favicons/favicon_york.png new file mode 100644 index 0000000..0ffb8be Binary files /dev/null and b/favicons/favicon_york.png differ diff --git a/play.html b/play.html index c0ef2a1..0e01978 100644 --- a/play.html +++ b/play.html @@ -5,7 +5,7 @@ PLANTAGENET - + 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] = [] -- cgit v1.2.3