diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-10-04 12:32:21 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-10-04 12:32:21 +0200 |
commit | 6430fbe8a22a50b3389f44e84154d5f3b5d6572e (patch) | |
tree | 19587dedbbbf242c7f5625ebb59c0352339c0114 | |
parent | d16efd818b967686123d4744f985b9c07d40b573 (diff) | |
download | server-6430fbe8a22a50b3389f44e84154d5f3b5d6572e.tar.gz |
300: Add tooltips to card numbers in game log.
-rw-r--r-- | public/common/client.js | 10 |
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)); } } |