summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-10-04 12:32:21 +0200
committerTor Andersson <tor@ccxvii.net>2021-10-04 12:32:21 +0200
commit6430fbe8a22a50b3389f44e84154d5f3b5d6572e (patch)
tree19587dedbbbf242c7f5625ebb59c0352339c0114
parentd16efd818b967686123d4744f985b9c07d40b573 (diff)
downloadserver-6430fbe8a22a50b3389f44e84154d5f3b5d6572e.tar.gz
300: Add tooltips to card numbers in game log.
-rw-r--r--public/common/client.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/public/common/client.js b/public/common/client.js
index a6b3453..9ef89e5 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -321,6 +321,12 @@ function on_update_bar() {
old_active = game.active;
}
+let create_log_entry = function (text) {
+ let p = document.createElement("div");
+ p.textContent = text;
+ return p;
+}
+
function on_update_log() {
let parent = document.getElementById("log");
let to_delete = parent.children.length - game.log_start;
@@ -329,9 +335,7 @@ function on_update_log() {
--to_delete;
}
for (let entry of game.log) {
- let p = document.createElement("div");
- p.textContent = entry;
- parent.prepend(p);
+ parent.prepend(create_log_entry(entry));
}
}