diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-03-19 21:25:52 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-03-19 21:27:47 +0100 |
commit | 19d48663a25cf6f9a93e8710f6896a2b43971fcd (patch) | |
tree | 639a7ffec368b4fff88fad893cadca9c8b965451 /play.js | |
parent | 4909e4464acb93f675fc9c23891257665d2979a1 (diff) | |
download | land-and-freedom-19d48663a25cf6f9a93e8710f6896a2b43971fcd.tar.gz |
More tweaks.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -605,7 +605,7 @@ function sub_card(_match, p1) { } function sub_medallion(_match, p1) { - return `<span class="tip" onmouseenter="on_focus_medallion_tip(${p1})" onmouseleave="on_blur_tip()">${data.medallions[p1].name}</span>` + return `<i class="tip" onmouseenter="on_focus_medallion_tip(${p1})" onmouseleave="on_blur_tip()">${data.medallions[p1].name}</i>` } function sub_token(match) { @@ -614,6 +614,7 @@ function sub_token(match) { case "Tc": return `<img src="images/icons/player_communist.png">` case "Tm": return `<img src="images/icons/player_moderate.png">` case "Tf": return `<img src="images/icons/player_fascist.png">` + case "HP": return `<img src="images/icons/hero_point.png">` } return match } @@ -630,6 +631,9 @@ function on_log(text) { // eslint-disable-line no-unused-vars p.className = "i" } + text = text.replace(/<-/g, "\u2190") + text = text.replace(/->/g, "\u2192") + text = text.replace(/&/g, "&") text = text.replace(/</g, "<") text = text.replace(/>/g, ">") @@ -638,6 +642,9 @@ function on_log(text) { // eslint-disable-line no-unused-vars text = text.replace(/\bC(\d+)\b/g, sub_card) text = text.replace(/\bM(\d+)\b/g, sub_medallion) text = text.replace(/\bT[acmf]\b/g, sub_token) + text = text.replace(/\bHP\b/g, "Hero points") + // text = text.replace(/\bHP\b/g, "\u272b") + // text = text.replace(/\bHP\b/g, sub_token) if (text.startsWith("#")) { p.className = "h " + text[1] |