js-2048
js-2048 copied to clipboard
Add event handlers for swipe actions on mobile devices
I implemented swipe handlers using an MIT-licensed event library called swiped-events.
Also added overscroll-behavior-y: contain; to html and body tags in the CSS file to prevent default "pull-to-refresh" behavior.
Since the HTML is responsive, I figured people would want to play on their mobile browsers, too (I have been playing on my phone and it is quite fun :smile:).
Hope this helps.
Best regards.
Cem.