diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-05-24 18:14:13 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:12:55 +0100 |
commit | da8679de9bef2713b91542a813d20eacb47e7a2b (patch) | |
tree | 825b6c38a4cb3993df0238fec733128d32d4e1ed /play.js | |
parent | cb9d248f17e332f5d73cce0e1e14ea95f8867868 (diff) | |
download | richard-iii-da8679de9bef2713b91542a813d20eacb47e7a2b.tar.gz |
Past tense log.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -69,18 +69,22 @@ function on_log(text) { text = text.replace(/^([A-Z]):/, '<span class="$1"> $1 </span>'); - if (text.match(/^Scenario: /)) + if (text.match(/^Scenario: /)) { p.className = 'st', text = text.substring(10); - else if (text.match(/^~ .* ~$/)) + } else if (text.match(/^~ .* ~$/)) { p.className = 'br', text = text.substring(2, text.length-2); - else if (text.match(/^Start Lancaster turn/)) + } else if (text.match(/^Start Lancaster turn/)) { + text = "Lancaster"; p.className = 'L'; - else if (text.match(/^Start York turn/)) + } else if (text.match(/^Start York turn/)) { + text = "York"; p.className = 'Y'; - else if (text.match(/^Start /)) + } else if (text.match(/^Start /)) { p.className = 'st', text = text.replace(/\.$/, ""); - else if (text.match(/^Battle in/)) + } else if (text.match(/^Battle in/)) { + text = text.substring(0,text.length-1); p.className = 'bs'; + } if (text.match(/^Start /)) text = text.substring(6); |