diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-02 13:40:07 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-02 13:40:44 +0200 |
commit | 6416d8649a057e3383114fb9c88c0be343366095 (patch) | |
tree | 21dd0848be4ec6ff4bb1a5e1e2c8b53ae1379cf8 | |
parent | d57040e3b8d442460dc77a2a442f014164c88c5b (diff) | |
download | server-6416d8649a057e3383114fb9c88c0be343366095.tar.gz |
Add on_prompt callback for styling prompt text as HTML.
-rw-r--r-- | public/common/client.js | 5 |
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) |