summaryrefslogtreecommitdiff
path: root/web/static/dartboat.js
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-24 01:52:28 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-24 01:52:28 -0700
commit3473a93fbb19846453d901505a720c2ccacb08d7 (patch)
tree6b6d6587da94b87da7f7d81cc986de9ce96b00bc /web/static/dartboat.js
parent3aa490e9cce29fd3d95eb0ce57b9744b3ed26516 (diff)
downloaddartboat-3473a93fbb19846453d901505a720c2ccacb08d7.tar.gz
dartboat-3473a93fbb19846453d901505a720c2ccacb08d7.tar.xz
web: minor style updates
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r--web/static/dartboat.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js
index 4967f18..35dac17 100644
--- a/web/static/dartboat.js
+++ b/web/static/dartboat.js
@@ -163,12 +163,16 @@ function setPlayerActive(n) {
e.classList[n && e.id == `p${n}-info` ? 'add' : 'remove']('active'));
}
-function hidePlayer2(n) {
- document.getElementById('p2-info').style.visibility = 'hidden';
+function hidePlayerInfo(n) {
+ let elems = document.getElementById(`p${n}-info`).children;
+ for (let i = 0; i < elems.length; ++i)
+ elems[i].style.visibility = 'hidden';
}
-function unhidePlayer2(n) {
- document.getElementById('p2-info').style.removeProperty('visibility');
+function showPlayerInfo(n) {
+ let elems = document.getElementById(`p${n}-info`).children;
+ for (let i = 0; i < elems.length; ++i)
+ elems[i].style.removeProperty('visibility');
}
function updatePlayerRem(n, ptr) {