Guest User

Untitled

a guest
Mar 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. document.documentElement.addEventListener('touchstart', function (event) {
  2. if (event.touches.length > 1) {
  3. event.preventDefault();
  4. }
  5. }, false);
  6.  
  7. document.documentElement.addEventListener('touchmove', function (event) {
  8. if (judgeMultiTouch(event)) event.preventDefault();
  9. }, false);
  10.  
  11. var lastTouchEnd = 0;
  12. document.documentElement.addEventListener('touchend', function (event) {
  13. var now = (new Date()).getTime();
  14. if (now - lastTouchEnd <= 300) {
  15. event.preventDefault();
  16. }
  17. lastTouchEnd = now;
  18. }, false);
Add Comment
Please, Sign In to add comment