You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix Save As crash on Zotero 8+ by using Zotero's FilePicker module
Firefox 128+ (Zotero 8) changed nsIFilePicker.init() to take a
BrowsingContext instead of a window, so the raw nsIFilePicker code in
promptSavePath() threw NS_ERROR_XPC_BAD_CONVERT_JS on Zotero 8/9 and the
markdown .zip export never showed a save dialog.
Route the dialog through the toolkit's FilePickerHelper, which delegates
to Zotero's own FilePicker module (chrome://zotero/content/modules/
filePicker.mjs). Zotero's wrapper passes window.browsingContext on new
platforms and keeps working on Zotero 7, so the plugin no longer touches
the changing XPCOM signature directly.
Fixes#39https://claude.ai/code/session_01KUFXvTTsWqrPNDJ8Vi1oPL
* Silence ChromeUtils.import() errors on Zotero 8+ via build-time toolkit patch
zotero-plugin-toolkit (through at least 5.1.2) detects the legacy JSM
loader with `typeof ChromeUtils.import === "undefined"`. On Zotero 8+
(Firefox 140) ChromeUtils.import still exists but only throws
"ChromeUtils.import() has been removed. Use importESModule()", so the
toolkit rewrote Console.sys.mjs back to Console.jsm and the import threw
once per helper constructed at startup — 16 console errors on every
launch.
Add an esbuild plugin that patches the bundled toolkit's _importESModule
to try ChromeUtils.importESModule first (available since Firefox 106, so
on every supported Zotero) and keep the legacy loader as a fallback for
Zotero 7. The patch is an exact-match string replacement that fails the
build loudly if the toolkit source changes, so a future toolkit upgrade
cannot silently un-apply it; once the toolkit fixes its feature
detection upstream, the plugin block can simply be deleted.
Fixes#40https://claude.ai/code/session_01KUFXvTTsWqrPNDJ8Vi1oPL
* README: add a novice-friendly quick start and smooth the install path
Getting-started editing pass aimed at first-time users:
- Add a Quick start section that spells out the two-part setup (local
docling-serve + plugin) and walks the happy path end to end, with a
heads-up about the first-run model download.
- Link installation guides for uv and pipx, and point readers without
Python tooling at the container option.
- Add a browser-based sanity check (the /ui playground) alongside curl.
- Turn plugin installation into numbered steps, drop the stale "(when
available)" hedge, and warn about Firefox auto-installing the .xpi.
- Mark the from-source path as development-oriented (Node 20+) and scope
the macOS .env note to the npm start workflow.
- Fix the "within seconds" promise that contradicted the 2-10 minute
first-run download, and de-emoji the model-weights heading so section
anchors stay stable.
https://claude.ai/code/session_01KUFXvTTsWqrPNDJ8Vi1oPL
* Add an Exclude images option for text-and-tables-only markdown
docling-serve defaults image_export_mode to "embedded", which inlines
every figure as a base64 data URI and can grow a paper's .md by tens of
megabytes. A new opt-in "Exclude images" checkbox in Settings → Output
sends image_export_mode=placeholder instead, so each image becomes a
tiny <!-- image --> comment and the markdown keeps only text and tables.
The plugin now always sends image_export_mode explicitly ("embedded"
when the box is unticked — identical to the previous server-default
behavior), and the advancedJson escape hatch still overrides it for
users who want "referenced" or other modes. Wired through prefs.js
defaults, generated pref typings, the preferences pane (+ en-US
strings), reset-to-defaults, buildConvertForm and its unit tests, and
the README feature list.
https://claude.ai/code/session_01KUFXvTTsWqrPNDJ8Vi1oPL
* Add a Remove-images utility for existing docling markdown
Markdown converted before the Exclude-images option (or with it off)
carries every figure as an embedded base64 data URI, so a single paper's
.md can be tens of megabytes. This adds a retroactive cleanup: select
items and right-click "Remove images from markdown" (or Tools → Docling:
Remove images from markdown…) to rewrite their .md attachments in place,
replacing each markdown image or raw <img> tag with the same
<!-- image --> placeholder docling emits in image_export_mode=placeholder.
The pure transform lives in utils/stripImages.ts: line-based so fenced
code blocks are skipped (image syntax shown in a code sample isn't an
image), inline-safe so images inside table cells keep the table shape,
and idempotent. The orchestrator in modules/removeImages.ts resolves
selections the same way the zip export does (md attachments directly,
PDFs via their matching .md sibling, parents via their PDF children),
guards the destructive rewrite behind a confirm dialog, refuses to run
while a conversion batch is in flight, and reports replaced-image count
and bytes saved (new formatBytes helper) in the completion toast.
Covered by unit tests for the transform (embedded/table/HTML/fence/
idempotence cases plus fast-check properties) and formatBytes.
https://claude.ai/code/session_01KUFXvTTsWqrPNDJ8Vi1oPL
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: addon/locale/en-US/preferences.ftl
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,9 @@ pref-attach-to-item =
37
37
pref-add-frontmatter =
38
38
.label = Prepend YAML frontmatter with Zotero metadata
39
39
pref-frontmatter-help = Adds title, authors, year, doi, url, zotero_key, citation_key to every .md output as a YAML --- block at the top.
40
+
pref-exclude-images =
41
+
.label = Exclude images — keep only text and tables
42
+
pref-exclude-images-help = By default every figure is embedded in the .md as base64 data, which can grow a paper's markdown by tens of megabytes. When enabled, each image is replaced with a tiny <!-- image --> placeholder comment instead.
40
43
pref-export-folder = Export folder
41
44
pref-export-folder-help = Absolute path. If set, every converted .md is ALSO written here. Filename uses the item's citation key when available, otherwise the Zotero item key. Leave empty to disable.
0 commit comments