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