From 806337899029f08bd71fc27be5537e7cc4d590ce Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 9 Oct 2026 00:45:34 -0700 Subject: Feed scrolls faster on a desktop: a wheel notch pushes a quarter further, and a grab-and-flick throws twice as hard with a higher top speed Co-Authored-By: Claude Opus 5.5 --- src/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index 537ba0d..5d7d22b 100644 --- a/src/app.js +++ b/src/app.js @@ -6388,7 +6388,7 @@ if (INTENT_URI) { if (typeof window === 'undefined' || matchMedia('(prefers-reduced-motion: reduce)').matches) return; const SCOPE = '.feed-page, .notes-feed'; const TAU = 325; // ms: how quickly a coast dies down (the phone's feel) - const VMAX = 9; // px/ms + const VMAX = 16; // px/ms const inScope = (t) => { const el = t && t.closest ? t : t && t.parentElement; if (!el || !el.closest(SCOPE)) return false; @@ -6430,7 +6430,7 @@ if (INTENT_URI) { const px = e.deltaMode === 1 ? e.deltaY * 40 : e.deltaY; // reverse turns brake first; same-way turns add to the coast already going const keep = Math.sign(v) === Math.sign(px) ? v : 0; - coast(keep + (px * 2.4) / TAU); + coast(keep + (px * 3) / TAU); }, { passive: false }); // anything else that moves the page takes over from a coast window.addEventListener('keydown', (e) => { if (/^(Arrow|Page|Home|End| )/.test(e.key)) stop(); }); @@ -6469,7 +6469,7 @@ if (INTENT_URI) { document.documentElement.classList.remove('grab-scrolling'); const p = d.pts, a = p[0], b = p[p.length - 1]; // released while moving: throw it; held still first: just let go - if (a && b && b[0] > a[0] && e.timeStamp - b[0] < 60) coast((a[1] - b[1]) / (b[0] - a[0]) * 1.2); + if (a && b && b[0] > a[0] && e.timeStamp - b[0] < 60) coast((a[1] - b[1]) / (b[0] - a[0]) * 2.4); } // the press moved: what it started on isn't opened (Chrome still clicks it) const eat = (ev) => { ev.stopPropagation(); ev.preventDefault(); }; -- cgit v1.2.3