From 3486f6996ef56cd298dfd6089885174545c780bb Mon Sep 17 00:00:00 2001 From: John Wooten <60260750+JFWooten4@users.noreply.github.com> Date: Sat, 31 Oct 2026 22:24:08 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=8C=EF=B8=8F=20Add=20two-page=20PDF=20?= =?UTF-8?q?spreads=20with=20offset=20cover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add persistent two-page and offset-cover checkboxes to the viewer's More PDF tools menu. Render facing pages in a two-column grid, fit spreads to the available width, preserve the reading position when switching layouts, and retain one-page printing. Add focused regression tests to the existing CI test command. Co-authored-by: ChatGPT 6 --- package.json | 2 +- src/viewer.html | 9 ++++ src/viewer/viewer-settings.js | 48 ++++++++++++++++- src/viewer/viewer.css | 23 ++++++++ tests/two-page-layout.test.mjs | 97 ++++++++++++++++++++++++++++++++++ 5 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 tests/two-page-layout.test.mjs diff --git a/package.json b/package.json index 814a18e..b25b9e2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "node scripts/build.mjs", "check": "node scripts/check-extension.mjs", - "test": "node --test tests/enhancer-setup.test.mjs tests/document-title.test.mjs tests/metadata-doi.test.mjs tests/local-file-favicon.test.mjs tests/page-tab-labels.test.mjs tests/minimap.test.mjs tests/clickable-reference-links.test.mjs tests/printed-page-jump.test.mjs tests/markdown-copy.test.mjs tests/terminal-punctuation-selection.test.mjs tests/footnote-click-copy.test.mjs tests/chatgpt-summary-popup.test.mjs tests/chatgpt-pdf-relay.test.mjs tests/selection-gaps.test.mjs" + "test": "node --test tests/enhancer-setup.test.mjs tests/document-title.test.mjs tests/metadata-doi.test.mjs tests/local-file-favicon.test.mjs tests/page-tab-labels.test.mjs tests/minimap.test.mjs tests/clickable-reference-links.test.mjs tests/printed-page-jump.test.mjs tests/markdown-copy.test.mjs tests/terminal-punctuation-selection.test.mjs tests/footnote-click-copy.test.mjs tests/chatgpt-summary-popup.test.mjs tests/chatgpt-pdf-relay.test.mjs tests/selection-gaps.test.mjs tests/two-page-layout.test.mjs" }, "dependencies": { "pdfjs-dist": "6.3.289", diff --git a/src/viewer.html b/src/viewer.html index eeb4de1..f16a9d0 100644 --- a/src/viewer.html +++ b/src/viewer.html @@ -146,6 +146,15 @@ + + +