Skip to content

Commit

Permalink
fixed mobile click events
Browse files Browse the repository at this point in the history
  • Loading branch information
BotSpace committed Feb 15, 2024
1 parent 4093427 commit 2f7d16a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ if (localStorage.getItem(toggleMobile.id) == null) {
}

document.addEventListener('DOMContentLoaded', function () {
toggleMobile.onclick = updateMobileSlider.bind(null, toggleMobile, true);
toggleKeyboardWASD.onclick = updateSlider.bind(null, toggleKeyboardWASD, true);
toggleLegacyPacket.onclick = updateSlider.bind(null, toggleLegacyPacket, true);
toggleInfo.onclick = updateInfoSlider.bind(null, toggleInfo, true);
toggleMobile.addEventListener('click', updateMobileSlider.bind(null, toggleMobile, true));
toggleKeyboardWASD.addEventListener('click', updateSlider.bind(null, toggleKeyboardWASD, true));
toggleLegacyPacket.addEventListener('click', updateSlider.bind(null, toggleLegacyPacket, true));
toggleInfo.addEventListener('click', updateInfoSlider.bind(null, toggleInfo, true));


if (localStorage.getItem(toggleMobile.id) === 'true') updateMobileSlider(toggleMobile, false);
if (localStorage.getItem(toggleKeyboardWASD.id) === 'true') updateSlider(toggleKeyboardWASD, false);
Expand Down

0 comments on commit 2f7d16a

Please sign in to comment.