diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-02 23:05:47 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-02 23:05:47 +0000 |
commit | 543e0139e327f31a84ac8fa0f159ef3a07186e21 (patch) | |
tree | 7b04143307b95e34de170951decde67cf127a1cd | |
parent | 0d8611336964652f0b14106bd0b6b64652208998 (diff) | |
download | 1989-dawn-of-freedom-543e0139e327f31a84ac8fa0f159ef3a07186e21.tar.gz |
wrap icons
-rw-r--r-- | play.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -994,6 +994,11 @@ function sub_arrow(match) { return '<span> → </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) |