summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-03-25 09:34:46 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-03-25 09:34:46 -0400
commit193161797ccde2361cb947ca912f6045818c0be4 (patch)
treef2fc1062e5c660626d5a486ef8ab5e98ba896ded /play.js
parentf9780b1b67888e4ac75305b0e33c6225788ef1c7 (diff)
downloadvijayanagara-193161797ccde2361cb947ca912f6045818c0be4.tar.gz
Flags as acronyms
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/play.js b/play.js
index 6a0fcff..2dabece 100644
--- a/play.js
+++ b/play.js
@@ -1325,6 +1325,10 @@ function sub_space(match, p1) {
return `<span class="tip" onmouseenter="on_focus_space_tip(${x})" onmouseleave="on_blur_space_tip(${x})" onmousedown="on_click_space_tip(${x})">${n}</span>`
}
+const F_DS = '<img class="f" src="images/Flags_DS.png">'
+const F_BK = '<img class="f" src="images/Flags_BK.png">'
+const F_VE = '<img class="f" src="images/Flags_VE.png">'
+
function on_log(text) {
let p = document.createElement("div")
let sub_text = ""
@@ -1338,6 +1342,10 @@ function on_log(text) {
text = text.replace(/</g, "&lt;")
text = text.replace(/>/g, "&gt;")
+ text = text.replace(/\bFDS\b/g, F_DS)
+ text = text.replace(/\bFBK\b/g, F_BK)
+ text = text.replace(/\bFVE\b/g, F_VE)
+
if (text.match(/^\.h1 Mongol Invaders/)) {
text = text.substring(19)
p.className = "h1 mi"