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,17 +378,9 @@
|
|||
localStorage.audiomuted = audio.muted = musicmute.checked;
|
||||
playMusic();
|
||||
})
|
||||
volumeStepDwn.addEventListener('click', () => {
|
||||
var e = audio.volume - 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);
|
||||
})
|
||||
|
||||
volumeStepDwn.addEventListener('click', () => volumeAdd(-0.05))
|
||||
volumeStepUp.addEventListener('click', () => volumeAdd(0.05))
|
||||
|
||||
updateVolumeLabel();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue