forked from mirrors/akkoma-fe
rot.js volume step simplify
This commit is contained in:
parent
e323fa404b
commit
8c44100220
1 changed files with 3 additions and 11 deletions
|
@ -378,16 +378,8 @@
|
||||||
localStorage.audiomuted = audio.muted = musicmute.checked;
|
localStorage.audiomuted = audio.muted = musicmute.checked;
|
||||||
playMusic();
|
playMusic();
|
||||||
})
|
})
|
||||||
volumeStepDwn.addEventListener('click', () => {
|
volumeStepDwn.addEventListener('click', () => volumeAdd(-0.05))
|
||||||
var e = audio.volume - 0.05;
|
volumeStepUp.addEventListener('click', () => volumeAdd(0.05))
|
||||||
if (e < 0) e = 0;
|
|
||||||
volumeSet(e);
|
|
||||||
})
|
|
||||||
volumeStepUp.addEventListener('click', () => {
|
|
||||||
var e = audio.volume + 0.05;
|
|
||||||
if (e > 1) e = 1;
|
|
||||||
volumeSet(e);
|
|
||||||
})
|
|
||||||
|
|
||||||
updateVolumeLabel();
|
updateVolumeLabel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue