From c0b6808daab53262fff02fee5d1d5fcebf5f22d4 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 29 Nov 2024 13:38:06 +0100 Subject: Add margins to headers in log automatically (without needing log_br). --- play.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'play.js') 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" -- cgit v1.2.3