index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <Catalin.Mititiuc@gmail.com> | 2024-03-25 12:54:27 -0700 |
---|---|---|
committer | Catalin Mititiuc <Catalin.Mititiuc@gmail.com> | 2024-03-25 12:54:27 -0700 |
commit | de5f3c266677590d63fda98f25085b4327710def (patch) | |
tree | 6dddcb0f0bdb3904d1c1282ea85f0f683983b22c /index.js | |
parent | fd7bccda92563da8ed055d773e173b760880e524 (diff) |
Clean up some styles
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -300,15 +300,13 @@ map.addEventListener('mousemove', e => { document.querySelectorAll('.soldier-record').forEach(el => el.addEventListener('click', e => { - if (e.target.tagName !== 'INPUT' && e.target.tagName !== 'LABEL') { - if (el.classList.contains('selected')) { - el.classList.remove('selected'); - } else { - document.querySelectorAll('.soldier-record.selected').forEach(el => - el.classList.remove('selected') - ); - el.classList.add('selected'); - } + if (el.classList.contains('selected')) { + el.classList.remove('selected'); + } else { + document.querySelectorAll('.soldier-record.selected').forEach(el => + el.classList.remove('selected') + ); + el.classList.add('selected'); } }) ); |