diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-20 17:20:47 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 12:53:18 +0100 |
commit | fb6132e35be5b5ecc28b29f757231a2ee94175df (patch) | |
tree | 94089962b5afc8eac3fd164cbb8739c78a50bc35 /ui.js | |
parent | fcad5df0821e674c7f0fc7700707cd9be28fafd9 (diff) | |
download | hammer-of-the-scots-fb6132e35be5b5ecc28b29f757231a2ee94175df.tar.gz |
Use ID instead of class for battle dialog.
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -772,16 +772,16 @@ function on_update() { } if (game.battle) { - document.querySelector(".battle_header").textContent = game.battle.title; - document.querySelector(".battle_message").textContent = game.battle.flash; - document.querySelector(".battle").classList.add("show"); + document.getElementById("battle_header").textContent = game.battle.title; + document.getElementById("battle_message").textContent = game.battle.flash; + document.getElementById("battle").classList.add("show"); update_battle(); } else { - document.querySelector(".battle").classList.remove("show"); + document.getElementById("battle").classList.remove("show"); } } -drag_element_with_mouse(".battle", ".battle_header"); +drag_element_with_mouse("#battle", "#battle_header"); drag_element_with_mouse(".herald", ".herald_header"); scroll_with_middle_mouse("#grid_center", 2); init_map_zoom(); |