summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-01-02 23:05:47 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-01-02 23:05:47 +0000
commit543e0139e327f31a84ac8fa0f159ef3a07186e21 (patch)
tree7b04143307b95e34de170951decde67cf127a1cd
parent0d8611336964652f0b14106bd0b6b64652208998 (diff)
download1989-dawn-of-freedom-543e0139e327f31a84ac8fa0f159ef3a07186e21.tar.gz
wrap icons
-rw-r--r--play.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/play.js b/play.js
index 2b087d1..0e15fb6 100644
--- a/play.js
+++ b/play.js
@@ -994,6 +994,11 @@ function sub_arrow(match) {
return '<span>&nbsp&#8594&nbsp</span>'
}
+function wrap_icons(match) {
+ return `<span class="icon_holder">${match}</span>`;
+}
+
+
const ICONS = {
'£CC': '<span class="icon com_c"></span>',
'£CU': '<span class="icon com_nc"></span>',
@@ -1038,6 +1043,10 @@ function on_log(text, ix) {
p.className = "i"
}
+/*
+ text = text.replace(/(\(£[CDU][CU]\s\.to\s£[CDU][CU]\))/g, wrap_icons)
+*/
+
text = text.replace(/_/g, " ")
text = text.replace(/C(\d+)/g, sub_card_name)
text = text.replace(/P(\d+)/g, sub_power_card_name)