Modular enhancement suite for Danbooru/Gelbooru/Moebooru-family booru sites — original-quality media, smart downloads, fullscreen viewer, tag tools, blacklist filtering, infinite scroll, reverse image search, and more.
코드가 업데이트된 버전 목록입니다. 모든 버전 보기
# Booru Enhancer — v1.2.11## Changelog (1.2.10 → 1.2.11) — Safebooru / Gelbooru 0.2 layout fix- **Root cause of "only one tiny thumbnail per page, can't navigate or download" on Safebooru:** the gallery container was picked by a fixed selector list (`#post-list-posts, #post-list, .content`). On Safebooru `#post-list` is the **whole page row** (sidebar + content, a flex row in the site's own CSS), not the element that holds the thumbnails. The script turned that row into a CSS grid, so the sidebar and the entire thumbnail area were squeezed into two ~220px cells.- The container is now derived from the thumbnails themselves: it is the nearest element that actually holds the thumbnail wrappers (the parent of the first thumbnail, or the lowest common ancestor of the first two). This works for any layout and never picks the sidebar, the page row, or ``. Applies to the Gelbooru-family and generic adapters; the old selector list is only a fallback for fetched pages.- `display:grid` is now `!important`: the site's own `div#post-list { display:flex }` (id selector) used to out-rank the script's class.- Thumbnail wrappers get `box-sizing:border-box` (Safebooru's `.thumb` has 10px padding, which made 100%-wide cells overflow their grid column).- The grid fills the remaining width when its parent is a flex row (it used to shrink-wrap to a single column next to the sidebar).- Non-thumbnail children of the grid (paginator, clearfix, headings) now span the full row instead of occupying a thumbnail cell.- Thumbnails loaded by infinite scroll are inserted right after the last existing thumbnail, not after the paginator/other trailing nodes.
- Fixed "Download" saving the resized sample/preview instead of the full original on Gelbooru (e.g. post 7094291: 56 KB vs 1.2 MB).- Original URLs are now resolved in strict priority order, and any derived copy (`/samples/`, `/thumbnails/`, `sample_*`, `thumbnail_*`) is never accepted as "original": 1. The "Original image" link in the post's Options list 2. A `` source (video posts) 3. `og:image` / `twitter:image` meta tag (only if under `/images/`) 4. Any other `/images/` link that is not a sample/thumbnail- The displayed `#image` (a sample on Gelbooru) is only ever used as the `sampleUrl`, never as a fallback for `originalUrl`.- The Gelbooru `dapi` path (which now needs `api_key`/`user_id` for logged-out users) is only trusted when it yields a real original URL; otherwise the post page HTML is parsed. API results with a sample-looking `file_url` are discarded.- On a post page, the toolbar Download/Open Original buttons now prefer the original link actually present on that page.- "Open original" from the thumbnail action bar resolves the real original first instead of opening the sample.- `GM_download` now sends a `Referer` header.- The 8 s "safety net" no longer fires while a large file is still downloading (it used to trigger a second, duplicate browser download).- If only a sample/preview can be found, the file is still downloaded but a warning toast is shown instead of silently succeeding.
Infinite-scroll thumbnails rendered as blank/broken images. Additional pages are parsed in a detached document where the site's lazy-load JS never runs, so data-src/data-srcset were never promoted. Cloned images now resolve data-src → src and data-srcset → srcset before being appended. Uses the same truthy-fallback convention already in the file (img.src || img.dataset.src), so an empty src="" is correctly replaced. Verified against 5 edge cases: missing src, existing src not clobbered, no src/data-src at all, empty src="", srcset.
data-src
data-srcset
src
srcset
img.src || img.dataset.src
src=""
Sankaku Complex page-mutating stages broke the site. No dedicated adapter exists, so the generic adapter was mutating a DOM it wasn't written for. Now detects "generic adapter + sankakucomplex.com" and skips all page-mutating stages (menu command still registers). Guarded on all three re-entry paths — initial init, SPA pushState/popstate nav, and the MutationObserver fallback — via a single shared helper. The check keys off adapter.id === 'generic', not hostname alone, so it self-retires once a real sankaku adapter is added. Verified with 9 host-matching edge cases (subdomains, no false positives on lookalike domains, self-retirement).
sankakucomplex.com
init
adapter.id === 'generic'
sankaku
BE.VERSION
'1.2.7'
@version
1.2.8
1.2.9
User-Agent
## [1.2.8]**Infinite-scroll "hang" root-cause fix.**### Fixed- `BE.net.request()` previously treated *any* non-2xx HTTP status (403/404/500, etc.) the same as a transient network failure, silently retrying it up to the configured retry count before rejecting. Several booru sites respond to "page past the last one" with a non-2xx status rather than an empty 200 page — the old behavior meant a request like that would burn through all its retries, reject, land in `loadNextPage()`'s catch block, and retry the *entire request* again every 5 seconds, indefinitely, because it could never reach the "no more pages" branch. This was very likely the underlying cause of infinite scroll appearing to hang or never stop. Only genuine network failures (`onerror`/`ontimeout`) and explicit rate-limiting (429) are retried now; any response that actually completed is resolved and handed to the caller to interpret, whatever its status code.- `BE.net.json()` updated accordingly — since `request()` no longer filters out non-2xx responses itself, `json()` now explicitly checks for a 2xx status and throws if the response didn't succeed.### Known issue in this release- `@version` in the userscript header was bumped to `1.2.8`, but the internal `BE.VERSION` constant was left at `'1.2.7'`. This isn't just cosmetic: it's the version string reported in exported settings JSON, and it's sent as the literal `User-Agent` (`BooruEnhancer/1.2.7 (userscript)`) on every request the e621/e926 adapter makes. Fix pending in a follow-up patch release.
===============================================================================
FIXED
Moved gallery click and pointer-event delegation from capture phase to bubble phase.
Hardened Gelbooru-family thumbnail wrapper detection.
Removed the hard-coded Gelbooru "+42" pagination fallback.
Preserved and reinforced native pagination recovery.
Preserved pagination loop protection.
IMPROVED
Fixed infinite-scroll fallback pagination
Fixed initial gallery duplicate detection
loadedPostIds
Fixed gallery state resets
Fixed duplicate thumbnails during infinite scrolling
Fixed repeated infinite-scroll initialization
Fixed repeated infinite-scroll toggling
Fixed pagination loops
Fixed gallery replacement handling
More reliable pagination discovery
rel="next"
+42
Safer generic-site pagination
pid
Improved infinite-scroll failure handling
Improved page-loading diagnostics
Improved dynamic gallery support
Improved immediate thumbnail interaction
Improved gallery initialization
1.2.5
Tested architecture targets:
v1.2.5 focuses on making the gallery and infinite-scroll system idempotent, duplicate-safe, loop-resistant, and resilient to SPA/AJAX page changes, while preserving the existing viewer, downloader, settings, metadata, and adapter architecture.
The following settings are now available:
gallery.infiniteScroll
gallery.gridDensity
gallery.thumbnailSize
gallery.gridGap
The downloader now supports:
GM_download
Example:
Character - Artist (123456).jpg
gallery.compactMode
Note: Infinite-scroll pagination is still being actively tested across the different Gelbooru-family implementations. Additional site-specific pagination fixes may follow.
[1.1.1]
Added a site-independent pagination API to adapters:
getNextUrl()
getPageIdentity()
getPostIdentity()
calculateNextUrl()
Added dedicated pagination support for:
Added support for Safebooru/Gelbooru-style:
#paginator a[alt="next"]
a[title="next"]
a.next
a[rel="next"]
Added PID-based pagination detection for Gelbooru-family sites.
Added automatic page-size detection from real pagination links.
Added calculated pagination fallback when a site does not expose a usable next link.
Added dynamic infinite-scroll sentinel with status messages:
Loading more…
Scroll for more…
No more posts
Unable to load the next page.
Added Retry button when a page request fails.
adapter.pagination
style.display
Fixed Safebooru infinite scroll stopping after the first page.
Fixed pagination logic that incorrectly marked a gallery as exhausted when the standard a[rel="next"] / a.next selectors were unavailable.
Fixed duplicate page requests.
Fixed duplicate post insertion across dynamically loaded pages.
Fixed pagination state being lost when the site's paginator DOM is replaced.
Fixed infinite-scroll requests being triggered concurrently.
Fixed false "No more posts" states when pagination detection temporarily fails.
"No more posts"
Fixed retry behavior by preserving the exact failed URL.
Fixed calculated pagination from losing existing query parameters such as tags, rating, sorting, page, pid, and s.
page
s
Current Page │ ▼ adapter.pagination.getNextUrl() │ ├── Explicit next link │ ├── Advancing PID/page link │ └── calculateNextUrl() fallback │ ▼ Load next page │ ▼ Validate response │ ▼ Extract posts │ ▼ Deduplicate posts │ ▼ Insert into grid │ ▼ Find next page URL │ ▼ Continue scrolling
loadedPages
consecutiveEmptyPages
IDLE → LOADING → SUCCESS / ERROR / EXHAUSTED
BE.modules.gallery._scrollState
Settings persistence race conditions
Storage schema migration support
Gallery thumbnail sizing
gridDensity / compactMode
gridDensity
compactMode
--be-grid-columns
--be-thumb-gap
Gelbooru-family API failures
fetch()
GM_xmlhttpRequest
Silent toolbar/keybind failures
Settings-page consistency
GM_*
GM.*
Continued modular adapter-based design:
BE.core
BE.store
BE.settings
BE.bus
BE.net
BE.adapters.*
BE.modules.*
This release resolves the major issues identified in 1.0.x:
1.0.x
1.1.0
The following remain intentionally out of scope for this release:
The current architecture already provides extension points for these features without requiring changes to the core system.
changed namespace and version