summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-06-02 13:40:07 +0200
committerTor Andersson <tor@ccxvii.net>2024-06-02 13:40:44 +0200
commit6416d8649a057e3383114fb9c88c0be343366095 (patch)
tree21dd0848be4ec6ff4bb1a5e1e2c8b53ae1379cf8 /public
parentd57040e3b8d442460dc77a2a442f014164c88c5b (diff)
downloadserver-6416d8649a057e3383114fb9c88c0be343366095.tar.gz
Add on_prompt callback for styling prompt text as HTML.
Diffstat (limited to 'public')
-rw-r--r--public/common/client.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/common/client.js b/public/common/client.js
index 367cbb0..229f8ae 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -581,7 +581,10 @@ let is_your_turn = false
let old_active = null
function on_update_header() {
- document.getElementById("prompt").textContent = view.prompt
+ if (typeof on_prompt === "function")
+ document.getElementById("prompt").innerHTML = on_prompt(view.prompt)
+ else
+ document.getElementById("prompt").textContent = view.prompt
if (params.mode === "replay")
return
if (snap_view)