--
This commit is contained in:
+3
-3
@@ -43,14 +43,14 @@
|
|||||||
|
|
||||||
function onTap() {
|
function onTap() {
|
||||||
tapCount++;
|
tapCount++;
|
||||||
if (tapCount >= 3) {
|
if (tapCount >= 10) {
|
||||||
clearTimeout(tapTimer);
|
clearTimeout(tapTimer);
|
||||||
tapCount = 0;
|
tapCount = 0;
|
||||||
location.href = '/qr-code/';
|
location.href = '/qr-code/';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
clearTimeout(tapTimer);
|
clearTimeout(tapTimer);
|
||||||
tapTimer = setTimeout(() => { tapCount = 0; }, 600);
|
tapTimer = setTimeout(() => { tapCount = 0; }, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
el.addEventListener('touchend', (e) => {
|
el.addEventListener('touchend', (e) => {
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
}, { passive: false });
|
}, { passive: false });
|
||||||
|
|
||||||
el.addEventListener('click', () => {
|
el.addEventListener('click', () => {
|
||||||
if (Date.now() - lastTouch < 500) return;
|
if (Date.now() - lastTouch < 1400) return;
|
||||||
onTap();
|
onTap();
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user