From 5710300aab56a761747f79d766bd257116d5287e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 13 Sep 2022 00:17:14 +0200 Subject: Log active and assault battles. And add .h4 subheading type so routs and refused battles don't stand out as much. --- play.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 33a4dda..ed17112 100644 --- a/play.js +++ b/play.js @@ -321,9 +321,7 @@ function for_each_side_in_path(path, fn) { } function on_focus_hex(evt) { - let h = evt.target.hex - let text = "(" + h + ") " + hex_name[h] - document.getElementById("status").textContent = text + document.getElementById("status").textContent = hex_name[evt.target.hex] } const unit_description = [] @@ -1095,6 +1093,10 @@ function on_log(text) { text = text.substring(4) p.className = "h3" } + if (text.match(/^\.h4/)) { + text = text.substring(4) + p.className = "h4" + } if (text.indexOf("\n") < 0) { p.innerHTML = text -- cgit v1.2.3