feat(manga): fetch a gallery from the grid, and stop hiding the bar when it is missing #16

Merged
rms merged 1 commit from feat/download-listing-pages into master 2026-11-28 03:56:24 -06:00
Owner

Bar gate no longer deletes itself for a gallery the library does not hold (that was the exact case); grid/tag/artist/search pages get a hover-revealed fetch pill that queues by card id and does not navigate. Adds a Chromium probe that asserts both and fails on the reverted fix. v2.1.12.

Bar gate no longer deletes itself for a gallery the library does not hold (that was the exact case); grid/tag/artist/search pages get a hover-revealed fetch pill that queues by card id and does not navigate. Adds a Chromium probe that asserts both and fails on the reverted fix. v2.1.12.
Two separate reasons the download button was nowhere to be seen.

The gallery-page bar deleted itself for a gallery the library does not hold: its gate
read "unknown and not favourited is nothing worth saying", and that is exactly the
state the button exists for. Being able to fetch the thing is worth saying, so a
fetchable gallery keeps the bar and the bar now says "not in library" in words.
That wording is local to the bar, not added to STATE_GLYPH, because that table also
drives the grid pills and "✕" on every unowned thumbnail of a tag page is a red wall
rather than a fact.

Listing pages had no affordance at all: markAnchor returned early for a missing
gallery, so a group/tag/artist/search page showed nothing on what you do not own.
It now renders a ⤓ pill that is invisible until the card is hovered (a page of 50
unowned thumbnails should not be covered in marks), takes clicks back from the
pointer-events:none badge, and calls the same queue endpoint with the card's own id -
preventDefault, or the cover link would navigate and the download would never be
asked for. The queue body carries the URL only when the id IS the page's gallery.
Tag/artist/character/search pages needed no matcher: the pill is driven by anchor
matches, not by page kind, so anything that lists /g/<id>/ links is covered.

versions: 2.1.12, and __gtSnapshot reported "2.1.8" - a stale literal that had been
three releases wrong, so the debug readout lied about which build was loaded.

Also adds gallery-toolbox.probe.mjs: both failures above were invisible to a linter
and shipped once, so the check drives a real Chromium DOM with the navigation
intercepted (no network, no Cloudflare, location.host still nhentai.net) and asserts
the pill appears, stays hidden until hover, and that the click posts {id, source}
without navigating. Verified it fails on the reverted fix. Event-driven pause
handling, not polled: Runtime.evaluate cannot answer while the document request is
held, so a poll loop deadlocks the moment it asks the page anything.
rms merged commit 09bfeb3dd3 into master 2026-11-28 03:56:24 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rms/userscripts!16
No description provided.