Repository navigation
Releases: gibsonchan-5/fleur-epub
Release list
0.2.46
Added
- Desktop footnote popup (optional, off by default) — a new settings toggle (\u6ce8\u89e3\u5f39\u5361/\u811a\u6ce8\u5f39\u5361) lets desktop users open a WeChat-Reading-style card with the note text when tapping a footnote marker (note number or \u6ce8 icon) in the book, instead of jumping to the note's location. Mobile behavior is unchanged (popup always). The card includes a \u201cview footnote location\u201d action, and only links recognized as footnotes pop the card \u2014 all other in-book links keep navigating as before.
Fixed
- Footnote card torn down immediately after opening \u2014 on desktop, foliate's chapter click handler (registered first) prevented the default jump and synchronously emitted the link event, then the plugin's own click-away handler (registered after) unconditionally hid the just-opened popup, making taps appear to do nothing. The hide is now skipped when the tap lands on an in-book link within 100ms of the popup opening, mirroring the existing overlayer hit-test guard.
- Duplicated footnote text \u2014 extracted note text no longer repeats adjacent identical lines caused by nested blocks (
aside > ol > li > p, common in zhangyue-style EPUBs).
Compatibility
- The toggle defaults to off, so existing desktop behavior (tap-to-jump) is byte-for-byte unchanged until the user opts in.
- No new network requests; footnote extraction and the popup are fully local.
0.2.45
Fixed
- Oversized footnote / rare-character icons in classic Chinese books — Obsidian's desktop CSP (
style-srcwithoutblob:) blocks the book's own stylesheets (rewritten to blob URLs by the renderer), so EPUBs that size inline icons via book CSS (e.g..cn_rarefont { height: 1em }) rendered them at raw pixel size (often ~96px, blowing up the line). - The reader now recovers only image-sizing rules (selectors exclusively matching
img/svg/video/embed/objectwithwidth/height/vertical-aligndeclarations) from the blocked stylesheets and re-injects them as an inline<style>, which CSP permits. Text styles stay untouched, so user typography settings (font family, size, line height) keep full precedence. Every step fails silently back to the previous rendering.
Compatibility
- No impact on normal books, annotations, WordWise, translation or TTS; unaffected books match zero rules and the patch is effectively inert.
- Also effective on mobile (end-independent logic; inline styles pass CSP on both platforms).
0.2.44 — optional cross-device sync for the standalone vocabulary notebook
- Standalone notebook cross-device sync (off by default): wordbook entries merge bidirectionally into a JSON file inside the vault (FleurEpub/data/wordbook.json), so any vault sync service (Remotely Save, iCloud, etc.) carries them across devices. Enable per device in settings; the existing data.json remains as a local fallback.\n- Safe merging: same-word conflicts resolve to the earliest add time, and empty meanings or phonetics are backfilled from the other device; deletions, renames and clearing write tombstones so removed words never resurrect, while a word re-added after deletion correctly survives.\n- Live updates: when the sync file changes on disk, the wordbook, WordWise hints and the management panel refresh automatically.\n- Privacy: the sync file lives entirely inside your vault and only travels with your own sync service — no new network endpoints, no telemetry.
0.2.43 — fix WordWise hints broken on real devices since 0.2.41
- Fixed WordWise hints not appearing on real devices: since 0.2.41, hint drawing used Obsidian's setCssStyles helper, which does not exist on elements inside the foliate section iframe (a separate JS realm without Obsidian prototype extensions) — every draw silently threw and no hints ever appeared. A fallback now patches the missing helper into the iframe realm before drawing, with semantics identical to Obsidian's implementation.
- Resilience: vocabulary gloss building is now atomic — malformed cross-plugin entry data can no longer wipe the wordbook; drawing is skipped while the view is hidden and resumes via workspace events, so hints survive tab switches, folding and reopening a book; scan/draw exceptions no longer break the recovery chain.
- Diagnostics: a debug trace switch is available for troubleshooting hint issues on real devices (enable via console: __fleurEpubWWTrace = true); it only logs debug-level messages when explicitly enabled.
- No data-collection changes: no new network endpoints, no telemetry.
0.2.42 — review compliance: setCssStyles with camelCase keys
- Review compliance: the no-static-styles-assignment rule also flags setCssProps/setCssStyles calls whose property keys are quoted kebab-case strings. Replaced those with setCssStyles using camelCase keys (pointerEvents, zIndex, maxWidth, maxHeight), which the rule accepts.
- No behavior change: camelCase keys via setCssStyles produce exactly the same inline styles — WordWise overlay positioning, the 1:1 pixel size mapping that defeats host max-width clamping, and pointer-events handling are all unchanged.
- Verified with the official eslint-plugin-obsidianmd ruleset locally: zero no-static-styles-assignment hits; internal probes (overlap, flow-switch, dictionary popup) all pass with identical results.
0.2.41 — review compliance: use Obsidian CSS helpers instead of direct style assignment
- Review compliance: replaced direct inline style writes (element.style.x = …, style.setProperty, setAttribute("style")) with Obsidian's setCssStyles / setCssProps helpers in the WordWise overlay and the standalone dictionary popup, as requested by the obsidianmd/no-static-styles-assignment review rule.
- No behavior change: the helpers write exactly the same inline styles — WordWise hints, dictionary popup drag/resize/position memory and the anti-jump visibility handling are all unchanged.
- Internal test probes (overlap, flow-switch, popup interactions) all pass with identical results.
0.2.40 — WordWise vocabulary hints, standalone dictionary lookup and wordbook management
- WordWise inline vocabulary hints: Kindle-style brief hints drawn above vocabulary words while reading, with automatic line-height floor and dotted-underline collision avoidance; toggle via the "注" button in the reader toolbar
- Standalone dictionary lookup: when FleurDict is not installed, word lookup now works via Youdao (English–Chinese) or Free Dictionary API, with the same popup experience as the FleurDict bridge — drag, resize, position memory, AI detail and add-to-wordbook
- Vocabulary notebook management: new management modal in settings with search, edit, delete, CSV export and clear-all with confirmation
- Translation panel: the AI detail chip no longer shows the prompt text in the user bubble
- Fixed: footnote popup text truncated mid-sentence by false note markers (e.g. years followed by a closing bracket, such as "(2016)")
- Privacy: looking up a word sends only that word to the chosen dictionary service; no other data is collected and there is no telemetry.
0.2.39
Re-release fixing a packaging mistake: the 0.2.38 release assets were missing styles.css, so anyone installing that version via BRAT or from the GitHub release ended up with an unstyled, visually broken plugin. This release ships the complete three-file bundle (main.js, manifest.json, styles.css) with no code changes.
0.2.38
Add user-configurable default colors for annotations: highlight, underline and wavy underline can now each be set with a native color picker in the settings page, on both desktop and mobile. Highlight defaults to vermilion red and underline to deep orange-red instead of the previous fixed blue and purple.
0.2.37
Mobile annotation sheet now shows the source text together with its comment (marked with an accent left border) instead of replacing it, aligned with the desktop layout.