From 0a55b115fbd714a137ea1489860b472705f66607 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 10 May 2024 02:23:09 +0400 Subject: [PATCH] In main.js fixed a bug and removed a multiplication by 100 for volume control. --- web/assets/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/assets/js/main.js b/web/assets/js/main.js index 60026c5..fd38619 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -84,11 +84,11 @@ audio.hidden = true; const audio_src = audio.childNodes[0].src; const volume = $("radio-volume"); -volume.value = +(localStorage.getItem("volume") || 50) * 100.0; +volume.value = +(localStorage.getItem("volume") || 50); audio.volume = volume.value / 100.0; volume.addEventListener("input", e => { audio.volume = e.target.value / 100.0; - localStorage.setItem("volume", audio.volume); }); + localStorage.setItem("volume", e.target.value); }); $("player").style.display = $("player").firstChild.style.display = "flex";