diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-16 15:24:30 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-16 15:24:30 +0100 |
| commit | 43ee6312f206bda8ca8f854e981f496ce8e3cd00 (patch) | |
| tree | 19e18b006682f1fb74cd7ba52961cb1ac6228adf | |
| parent | 4d0da26e93885d22583a0c0207809c925c76f789 (diff) | |
| download | themes-43ee6312f206bda8ca8f854e981f496ce8e3cd00.tar.gz themes-43ee6312f206bda8ca8f854e981f496ce8e3cd00.tar.bz2 themes-43ee6312f206bda8ca8f854e981f496ce8e3cd00.zip | |
Document pdfjs findbar patch and add to icon/header notes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rw-r--r-- | CLAUDE.md | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -89,6 +89,26 @@ separate included templates (matching the stock assembly pattern): - Do not use a separate `<div class="gallerybar">` or `<nav>` breadcrumb bar above the page; integrate breadcrumbs into `<small>` inside `<header>` instead +## pdfjs local patch (themes/js/pdfjs-5.2.133/web/viewer.mjs) +Standard pdfjs handles `#search=term` in the URL hash by highlighting matches silently but +does NOT open the findbar UI. A local patch restores that behaviour. Find the block: + +```javascript +if (params.has("search")) { + const query = params.get("search").replaceAll('"', ""), +``` + +And insert before the `this.eventBus.dispatch("findfromurlhash", ...)` call: + +```javascript +if (query) { + PDFViewerApplication.findBar.open(); + PDFViewerApplication.findBar.findField.value = query; +} +``` + +**Re-apply this patch after any pdfjs version upgrade.** + ## Icon sets (tango vs tango5) `util/iconsets/tango/` is the default iconset; `tango5/` is a richer superset. The `{biticon}` plugin searches the active style first, then falls back to `tango` — it does NOT fall back to |
