diff options
-rw-r--r-- | play.css | 5 | ||||
-rw-r--r-- | play.js | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -19,9 +19,12 @@ body.Coalition header.your_turn { background-color: white; } #log div { padding-left: 20px; text-indent: -12px; } #log div.i { padding-left: 32px; text-indent: -12px; } +#log span.french { background-color: hsl(195, 72%, 90%); padding: 0 2px } +#log span.anglo { background-color: white; padding: 0 2px } +#log span.prussian { background-color: gainsboro; padding: 0 2px } + main { background-color: dimgray; - background-color: hsl(39, 10%, 40%); } #mapwrap { @@ -525,6 +525,9 @@ function on_log(text) { text = text.replace(/P(\d+)/g, sub_piece) text = text.replace(/\bD\d\b/g, sub_dice) + text = text.replace(/French/g, '<span class="french">French</span>') + text = text.replace(/Coalition/g, '<span class="anglo">Coalition</span>') + if (text.match(/^\.h1 /)) { text = text.substring(4) p.className = "h1" |