From 3101179d9efa6ba3bb843fd257046e248f3c4d05 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Sun, 18 Aug 2019 15:51:22 -0700 Subject: [PATCH] life --- data/life/life.js | 8 +++++++- life.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/data/life/life.js b/data/life/life.js index 59937d68..22f3fdb4 100644 --- a/data/life/life.js +++ b/data/life/life.js @@ -264,9 +264,15 @@ function moveTouch() { touchX[i] = event.touches[i].clientX touchY[i] = event.touches[i].clientY } -// setTimeout(function(){window.scrollTo(0, 0)},50) } +//Attempt at getting past webkit's really annoying double tap zoom. Because it's been five years and they haven't added support for css's touch-action. Because I'm sure they have a really good excuse... +var lastTouchEnd = 0 function endTouch() { + var now = (new Date()).getTime() + if (now - lastTouchEnd <= 300) { + event.preventDefault() + } + lastTouchEnd = now for (var i = 1; i <= playerList.length; i++) { if (playerList[i - 1].touchId == event.changedTouches[0].identifier) { playerList[i - 1].touchId = 0.5 diff --git a/life.html b/life.html index 7436d0bb..2b946874 100644 --- a/life.html +++ b/life.html @@ -54,7 +54,7 @@ Starting Life Total:



- For an optimal experience, save this website to your home screen and open it from there.
Check out my other website, Card Conjurer, to easily create custom Magic cards! + For an optimal experience, save this website to your home screen and open it from there.

Check out my other website, Card Conjurer, to easily create custom Magic cards!