diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -543,6 +543,27 @@ function on_click_card(evt) { /* LOG */ +function on_log(text) { + let p = document.createElement("div") + text = text.replace(/&/g, "&") + text = text.replace(/</g, "<") + text = text.replace(/>/g, ">") + + if (text.startsWith("=t")) { + p.className = "h turn" + text = text.substring(2) + } else if (text.startsWith("=a")) { + p.className = "h america" + text = text.substring(3) + } else if (text.startsWith("=b")) { + p.className = "h britain" + text = text.substring(3) + } + + p.innerHTML = text + return p +} + /* OLD --- function on_log(text) { let p = document.createElement("div") |