summaryrefslogtreecommitdiff
path: root/web/static/dartboat.js
diff options
context:
space:
mode:
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) {