fix rot volume rep
This commit is contained in:
parent
daed10ba44
commit
1b37598723
1 changed files with 3 additions and 3 deletions
6
rot.js
6
rot.js
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue