From 19d48663a25cf6f9a93e8710f6896a2b43971fcd Mon Sep 17 00:00:00 2001 From: Tor Andersson <tor@ccxvii.net> Date: Wed, 19 Mar 2025 21:25:52 +0100 Subject: More tweaks. --- play.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index 24f26ee..918c052 100644 --- a/play.js +++ b/play.js @@ -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] -- cgit v1.2.3