diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1416,6 +1416,14 @@ function sub_icon(match) { return ICONS[match] ?? match } +function sub_repeat(match, n, sym) { + var s = sym + n = parseInt(n) + while (--n > 0) + s += "\u2009" + sym + return s +} + function on_prompt(text) { return text.replaceAll("a Amir", "an Amir") } @@ -1436,6 +1444,8 @@ function on_log(text) { text = text.replace(/</g, "<") text = text.replace(/>/g, ">") + text = text.replace(/([1-5]) (DDS|DBK|DVE|CDS|CMI|EDS|EBK|EVE)/g, sub_repeat) + text = text.replace(/\bDDS\b/g, sub_icon) text = text.replace(/\bDBK\b/g, sub_icon) text = text.replace(/\bDVE\b/g, sub_icon) @@ -1450,6 +1460,7 @@ function on_log(text) { text = text.replace(/\bFMI\b/g, sub_icon) text = text.replace(/\bIBK\b/g, sub_icon) text = text.replace(/\bIVE\b/g, sub_icon) + text = text.replace(/\bCAV\b/g, sub_icon) text = text.replace(/\bRES\b/g, sub_icon) |