Skip to content

Commit

Permalink
fix: fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
std-microblock authored Feb 4, 2023
1 parent 37425be commit 1ac68cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ setTimeout(() => {
}, 100)

setInterval(_ => {
document.querySelector(".j-vol").addEventListener("mousewheel", e => {
let currentVolume = parseInt(document.querySelector(".prg-spk.j-vol.f-dn .has").style.height) / 100;
document.querySelector(".j-vol").onmousewheel = e => {
const currentVolume = parseInt(document.querySelector(".prg-spk.j-vol.f-dn .has").style.height) / 100;
if (e.deltaY > 0) channel.call("audioplayer.setVolume", () => { }, ["", "", currentVolume - 0.1])
else channel.call("audioplayer.setVolume", () => { }, ["", "", Math.min(currentVolume + 0.1, 1)])
})
Expand Down

0 comments on commit 1ac68cf

Please sign in to comment.