ctucx.git: webmusic-nginx

nginx xslt-based index files optimized for music, inspired by https://git.ztn.sh/zotan/webmusic

commit 6ddd586d6cff1c84b5650d71b89bf4b9ff4e88d0
parent 1067312f5c70d52a71e8205ec235028cab86a356
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 7 Mar 2021 16:44:27 +0100

webmusic.js: use classes for buttons
1 file changed, 4 insertions(+), 4 deletions(-)
M
webmusic.js
|
8
++++----
diff --git 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');
 	}
 }