Last active
August 29, 2022 22:00
-
-
Save MtKanjon/9486be1ede02d883f5d3b72a3798193a to your computer and use it in GitHub Desktop.
spine's script thing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup for mobile device vibration when social links are clicked | |
const links = document.querySelectorAll('a.social-link'); | |
for (const link of links) { | |
link.addEventListener('click', (event) => { | |
if (window.navigator.vibrate) { | |
window.navigator.vibrate(10); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment