diff options
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] |