Leaner userscript: edge tab, card-click continue, test harness #7

Merged
sulthan merged 7 commits from feat/leaner-functionality into main 2026-07-28 16:21:02 +07:00
Owner

Drops the Continue and Edit buttons, makes the card body the continue target, adds a confirm to Remove, replaces the view-blocking circular FAB with a 7x44 edge tab plus a two-finger long-press, and adds a zero-dependency node:test harness for the adapter logic. Fixes a latent offsetWidth/offsetHeight bug in the FAB placement math. No backend or API change.

Verified live against real asurascans.com and demonicscans.org series and chapter pages: edge tab does not cover artwork, card-body click navigates, action buttons do not, Remove confirms and cancel preserves the row, the 25s dwell fill records progress, and the tab drags/snaps/clamps correctly.

Known and accepted: a deliberately slow two-finger pinch that stays inside the 15px slop for the full 500ms opens the panel. A normal-speed pinch (240px in ~240ms) cancels well before the timer. An absolute per-finger drift threshold cannot separate a slow pinch from two fingers resting, which is the gesture being detected.

Drops the Continue and Edit buttons, makes the card body the continue target, adds a confirm to Remove, replaces the view-blocking circular FAB with a 7x44 edge tab plus a two-finger long-press, and adds a zero-dependency node:test harness for the adapter logic. Fixes a latent offsetWidth/offsetHeight bug in the FAB placement math. No backend or API change. Verified live against real asurascans.com and demonicscans.org series and chapter pages: edge tab does not cover artwork, card-body click navigates, action buttons do not, Remove confirms and cancel preserves the row, the 25s dwell fill records progress, and the tab drags/snaps/clamps correctly. Known and accepted: a deliberately slow two-finger pinch that stays inside the 15px slop for the full 500ms opens the panel. A normal-speed pinch (240px in ~240ms) cancels well before the timer. An absolute per-finger drift threshold cannot separate a slow pinch from two fingers resting, which is the gesture being detected.
sulthan added 7 commits 2026-07-28 16:08:17 +07:00
Loads the IIFE in bare Node behind a minimal localStorage/document stub, with
document.body left undefined so the boot block defers and the UI never builds.
Adds a module.exports hook that is inert in every real userscript engine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Cover, title, and subtitle become one link to the last-read chapter. The action
row is a sibling of that link, so the destructive button is never also a
navigation target, and Remove now confirms. Manual chapter entry is dropped
entirely — the web UI has a real form, and in the field the existing
'Update to Chapter N' button covers it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The circular button covered artwork exactly while reading. The tab keeps the
drag-and-snap behaviour and the mangabm:fabpos key; only its box changes. The
dwell countdown becomes a bottom-up fill of the tab, since a sliver has no room
for a ring.

Also fixes a latent bug the new shape exposes: placeFab and makeDraggable used
offsetWidth for the vertical clamp too. Invisible on a 52px circle, off by 37px
on a 7x44 tab.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A second way in that does not depend on finding a 7px tab. Two fingers rather
than one because Chromium claims the one-finger long press for image menus and
text selection, and a manga reader is all images. Passive listeners; a
pinch-zoom cancels via the 15px slop check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The slop check cancels a normal-speed pinch, not every pinch. Verified live:
a deliberately slow one that stays inside 15px for the full 500ms does open
the panel. Accepted — an absolute per-finger drift threshold cannot separate
that from two fingers resting, which is the gesture being detected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The module.exports guard fired on any page whose own scripts define a UMD
module shim — under @grant none the userscript shares page globals, so that
clobbered the page's exports. A typeof window check keeps it to Node.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sulthan merged commit 324b2efad6 into main 2026-07-28 16:21:02 +07:00
sulthan deleted branch feat/leaner-functionality 2026-07-31 01:02:35 +07:00
Sign in to join this conversation.