summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-07 16:44:27 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-07 16:44:27 +0100
commit6ddd586d6cff1c84b5650d71b89bf4b9ff4e88d0 (patch)
tree429233b00dbf049ddb1b55a4927c2c28a22414ba
parent1067312f5c70d52a71e8205ec235028cab86a356 (diff)
downloadwebmusic-nginx-6ddd586d6cff1c84b5650d71b89bf4b9ff4e88d0.tar.gz
webmusic-nginx-6ddd586d6cff1c84b5650d71b89bf4b9ff4e88d0.tar.bz2
webmusic-nginx-6ddd586d6cff1c84b5650d71b89bf4b9ff4e88d0.zip
webmusic.js: use classes for buttons
-rw-r--r--webmusic.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/webmusic.js b/webmusic.js
index 877e3d2..0507a4d 100644
--- a/webmusic.js
+++ b/webmusic.js
@@ -132,15 +132,15 @@ const updatePlayerState = () => {
const updateButtonState = () => {
if (repeat !== false) {
- document.getElementById('repeatButton').style.color = '#6b9969';
+ document.getElementById('repeatButton').classList.add('active');
} else {
- document.getElementById('repeatButton').style.color = null;
+ document.getElementById('repeatButton').classList.remove('active');
}
if (continuous !== false) {
- document.getElementById('continuousButton').style.color = '#6b9969';
+ document.getElementById('continuousButton').classList.add('active');
} else {
- document.getElementById('continuousButton').style.color = null;
+ document.getElementById('continuousButton').classList.remove('active');
}
}