diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-04-17 00:38:21 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | ba60714ad6aeffda1361f2341c550d4dd4abf3e4 (patch) | |
tree | 1fbb8e9fabbb5d88e8119bb5ecfddc596124b0f6 /play.js | |
parent | cefc5b07aab200b8cdff8f60612040cca71fd242 (diff) | |
download | andean-abyss-ba60714ad6aeffda1361f2341c550d4dd4abf3e4.tar.gz |
Improve log messages.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -88,7 +88,7 @@ const LAYOUT = { "Cesar FARC": [901, 399], "Cesar DRUGS": [1054, 298], "Antioquia Govt": [621, 766], - "Antioquia AUC": [715, 807], + "Antioquia AUC": [707, 807], "Antioquia Cartels": [603, 978], "Antioquia FARC": [703, 965], "Antioquia DRUGS": [594, 1138], @@ -1374,21 +1374,18 @@ function on_log(text) { if (text.match(/^>/)) { text = text.substring(1) - p.className = "ind" + p.className = "indent" } text = text.replace(/&/g, "&") text = text.replace(/</g, "<") text = text.replace(/>/g, ">") - text = text.replace(/C(\d+)/g, sub_card) - text = text.replace(/S(\d+)/g, sub_space) - if (text.match(/^\.h1/)) { text = text.substring(4) p.className = "h1" } - else if (text.match(/^\.h2 Government/)) { + else if (text.match(/^\.h2 Gov/)) { text = text.substring(3) p.className = "h2 govt" } @@ -1416,11 +1413,18 @@ function on_log(text) { text = text.substring(4) p.className = "h4" } - else if (text.match(/^\.i/)) { + else if (text.match(/^\.n/)) { + text = text.substring(3) + p.className = "italic" + } + else if (text.match(/^\.f/)) { text = text.substring(3) - p.className = "i" + p.className = "indent italic" } + text = text.replace(/C(\d+)/g, sub_card) + text = text.replace(/S(\d+)/g, sub_space) + p.innerHTML = text return p } |