summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-13 00:17:14 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commit5710300aab56a761747f79d766bd257116d5287e (patch)
tree3c49da1f7cc03ee08f7ac3cb14cc60e431ff267c /play.js
parent54e758b692353fa6a47abc80c56cb7ea6475c44e (diff)
downloadrommel-in-the-desert-5710300aab56a761747f79d766bd257116d5287e.tar.gz
Log active and assault battles.
And add .h4 subheading type so routs and refused battles don't stand out as much.
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 5 insertions, 3 deletions
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