summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-29 13:38:06 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-29 13:38:06 +0100
commitc0b6808daab53262fff02fee5d1d5fcebf5f22d4 (patch)
tree977727493aa8432b2396e4648bbaf1e75852ba3e /play.js
parentc27ac795e947346dc6b1ef71236102508280ce60 (diff)
download1989-dawn-of-freedom-c0b6808daab53262fff02fee5d1d5fcebf5f22d4.tar.gz
Add margins to headers in log automatically (without needing log_br).
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/play.js b/play.js
index 1db1cb4..dfb9afe 100644
--- a/play.js
+++ b/play.js
@@ -878,15 +878,15 @@ function on_log(text) {
if (text.match(/^\.h1/)) {
text = text.substring(4)
p.className = "h1"
- } else if (text.match(/^\.h2d/)) {
- text = text.substring(5)
- p.className = "h2 dem"
- } else if (text.match(/^\.h2c/)) {
- text = text.substring(5)
- p.className = "h2 com"
} else if (text.match(/^\.h2/)) {
text = text.substring(4)
p.className = "h2"
+ } else if (text.match(/^\.d/)) {
+ text = "Democrat"
+ p.className = "h2 dem"
+ } else if (text.match(/^\.c/)) {
+ text = "Communist"
+ p.className = "h2 com"
} else if (text.match(/^\.h3/)) {
text = text.substring(4)
p.className = "h3"