From 33106f54b95cc3f303583d8da796b0707325a2d3 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 14 Jan 2024 15:26:35 +0200 Subject: [PATCH] increase swipe threshold on mobile --- files/assets/js/post.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/assets/js/post.js b/files/assets/js/post.js index 2da516047..c607d3797 100644 --- a/files/assets/js/post.js +++ b/files/assets/js/post.js @@ -74,10 +74,10 @@ function drag(e) { let fy = +(dy/y).toFixed(2); if (!getSelection().toString() && (f > 0.04 || f < -0.04) && (fy < 0.02 && fy > -0.02)) { - if (id_before && (f > 0.15 || (screen_width > 768 && f > 0.1))) { + if (id_before && (f > 0.2 || (screen_width > 768 && f > 0.1))) { location.href = `/post/${id_before}` } - if (id_after && (f < -0.15 || (screen_width > 768 && f < -0.1))) { + if (id_after && (f < -0.2 || (screen_width > 768 && f < -0.1))) { location.href = `/post/${id_after}` } }