Skip to content

Commit

Permalink
fixed event warning
Browse files Browse the repository at this point in the history
  • Loading branch information
BotSpace committed Feb 15, 2024
1 parent 9a9ea68 commit 6acbb3f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ document.addEventListener('DOMContentLoaded', function () {
updateSlider(toggleKeyboardWASD, toggleState=false);
updateSlider(toggleLegacyPacket, toggleState=false);
updateInfoSlider(toggleInfo, toggleState=false);

toggleMobile.onmousedown = updateMobileSlider.bind(null, toggleMobile, toggleState=true)
toggleKeyboardWASD.onmousedown = updateSlider.bind(null, toggleKeyboardWASD, toggleState=true)
toggleLegacyPacket.onmousedown = updateSlider.bind(null, toggleLegacyPacket, toggleState=true)
toggleInfo.onmousedown = updateInfoSlider.bind(null, toggleInfo, toggleState=true)

toggleMobile.addEventListener('mousedown', updateMobileSlider.bind(null, toggleMobile, toggleState=true));
toggleKeyboardWASD.addEventListener('mousedown', updateSlider.bind(null, toggleKeyboardWASD, toggleState=true));
toggleLegacyPacket.addEventListener('mousedown', updateSlider.bind(null, toggleLegacyPacket, toggleState=true));
toggleInfo.addEventListener('mousedown', updateInfoSlider.bind(null, toggleInfo, toggleState=true));

toggleMobile.addEventListener('touchstart', updateMobileSlider.bind(null, toggleMobile, toggleState=true));
toggleKeyboardWASD.addEventListener('touchstart', updateSlider.bind(null, toggleKeyboardWASD, toggleState=true));
toggleLegacyPacket.addEventListener('touchstart', updateSlider.bind(null, toggleLegacyPacket, toggleState=true));
toggleInfo.addEventListener('touchstart', updateInfoSlider.bind(null, toggleInfo, toggleState=true));
toggleMobile.ontouchstart = updateMobileSlider.bind(null, toggleMobile, toggleState=true)
toggleKeyboardWASD.ontouchstart = updateSlider.bind(null, toggleKeyboardWASD, toggleState=true)
toggleLegacyPacket.ontouchstart = updateSlider.bind(null, toggleLegacyPacket, toggleState=true)
toggleInfo.ontouchstart = updateInfoSlider.bind(null, toggleInfo, toggleState=true)

window.setInterval(renderLoop, 40); // call renderLoop every num milliseconds
});
Expand Down

0 comments on commit 6acbb3f

Please sign in to comment.