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