Skip to content

Copy button reference pass#368

Open
nathanvercaemert wants to merge 7 commits intomasterfrom
copy-button-reference-pass
Open

Copy button reference pass#368
nathanvercaemert wants to merge 7 commits intomasterfrom
copy-button-reference-pass

Conversation

@nathanvercaemert
Copy link
Copy Markdown
Contributor

No description provided.

vercaemert and others added 7 commits March 28, 2026 14:01
* Add selection info section to copy modal

Track browser text selection via selectionchange events and display
the highlighted verse range, version, and text snippet in the copy
modal. Handles all passage DOM variants (Bible, commentary, interlinear,
interleaved/column comparison) and works across desktop and mobile by
capturing selection data before modal focus clears it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Preserve selection tracking through minification

* Initialize selection tracking during page startup

* Inline selection verse extraction in startup listener

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collect every touched version in the selection summary so compare selections list all visible versions.

Known shortcoming: interlinear mode still uses heuristic DOM-based attribution, so version reporting there can be ambiguous and may still need a dedicated rule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enable notes and cross-references in the copy modal when multiple Bible
versions are loaded. Previously blocked by a single-version guard.

- Add _fetchNotesForVersions: per-version API fetch with version-labeled
  end-note sections (e.g. "Notes (ESV):", "Cross references (HCSB):")
- Add _injectMarkersIntoClone: inject inline markers (a-ESV), (n1-HCSB)
  into DOM clone before text extraction, matching end-note IDs
- Add _xrefLetter: sequential letter generator for consistent xref IDs
  across inline markers and end-notes
- Fix _getOsisIdsForRange: use .versenumber elements (matching goCopy's
  clone trimming) instead of .verseLink to fix verse range mismatch in
  multi-version mode
- Update _extractNotesFromHTML to use sequential xref letters matching
  the inline marker scheme
- Update _buildChapterVerseTable to check all loaded versions for notes
  capability, not just the master version

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy Button Reference Pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants