From d1dd9316d41cf86ccf4739355d88afd10ad27e05 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 18 Jan 2022 14:42:05 +0100 Subject: Improve log formatting. --- play.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 277145e..f9fd829 100644 --- a/play.js +++ b/play.js @@ -133,10 +133,16 @@ create_log_entry = function (text) { text = text.replace(/\u201c(.*)\u201d/g, sub_log_entry_tip); if (text.match(/^Start of \d+/)) { text = text.substring(9, text.length-1); - p.className = 'st'; + p.className = 'year'; } else if (text.match(/^Start of /)) { text = text.substring(9, text.length-1); - p.className = 'ss'; + p.className = 'season'; + } else if (text.match(/^Pirate raid from/)) { + p.className = 'raid'; + } else if (text.match(/^(Naval|Land) (battle|bombardment) in/)) { + p.className = 'battle'; + } else if (text.match(/^(Naval|Land) battle (round)/)) { + p.className = 'round'; } else if (text.match(/(victory:|ends in a draw)/)) { p.className = 'end'; } -- cgit v1.2.3