fix rot volume rep

This commit is contained in:
uwaa 2025-01-11 13:57:08 +00:00
parent daed10ba44
commit 1b37598723

6
rot.js
View file

@ -77,7 +77,7 @@
function volumeSet(number) {
audio.volume = number; //Set
localStorage.audiovolume = Math.round(number * 100); //Save
localStorage.audiovolume = number; //Save
updateVolumeLabel();
}
function volumeAdd(number) {
@ -249,8 +249,8 @@
audio.loop = true;
audio.id = "user-music";
audio.style = "display:none;";
if (localStorage.audiovolume)
audio.volume = localStorage.audiovolume / 100; //Load volume
if (localStorage.audiovolume && localStorage.audiovolume >= 0 && localStorage.audiovolume <= 1)
audio.volume = localStorage.audiovolume; //Load volume
else
audio.volume = 0.2; //Default volume