From 6cc0e4ad54fc60acca67f00c7cd92f8649611755 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 18 May 2023 11:30:54 +0200 Subject: Fix loading jank. --- play.html | 22 +++++++++++----------- play.js | 7 ++++++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/play.html b/play.html index 0f3f003..935c069 100644 --- a/play.html +++ b/play.html @@ -171,9 +171,9 @@
-
-
-
+
+
+
@@ -181,14 +181,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/play.js b/play.js index 1e6aaeb..7a539a3 100644 --- a/play.js +++ b/play.js @@ -1063,7 +1063,13 @@ function make_card_class_name(c) { return "card card_" + c + " u" + data.card_unshaded_lines[c] + " s" + data.card_shaded_lines[c] } +let once = true function on_update() { + if (once) { + init_ui() + once = false + } + switch (player) { case "Government": ui.favicon.href = "images/icon_govt.png"; break case "AUC": ui.favicon.href = "images/icon_auc.png"; break @@ -1516,5 +1522,4 @@ function map_get(map, key, missing) { return missing } -init_ui() scroll_with_middle_mouse("main") -- cgit v1.2.3