Skip to content

Expose src/lib/slug.js as a web accessible resource - #1

Merged
rsmedstad merged 1 commit into
mainfrom
fix/web-accessible-slug
Jul 20, 2026
Merged

Expose src/lib/slug.js as a web accessible resource#1
rsmedstad merged 1 commit into
mainfrom
fix/web-accessible-slug

Conversation

@rsmedstad

Copy link
Copy Markdown
Contributor

The in-page panel dynamically imports src/lib/settings.js, which reaches src/lib/slug.js via settings-schema.jstemplate.js. Because slug.js was missing from web_accessible_resources, Chrome blocked that last hop:

Denying load of chrome-extension://.../src/lib/slug.js

The panel still rendered but its settings read failed. Surfaced while capturing screenshots of the extension.

Audit

Traced the full transitive import graph from every content-script entry point rather than patching the one file:

  • src/content/panel-host.js → dynamic import(settings.js)
  • settings.jssettings-schema.jstemplate.jsslug.js ← the missing hop
  • markdown.jsvendor/turndown*.js (glob-covered)
  • src/content/*.js adapters → within src/content/*, plus vendor/readability.js and lib/markdown.js (already listed)

slug.js was the only file missing; everything else was already covered. No glob was needed, so the web-accessible surface stays minimal.

Verification

  • npm test → 386/386 pass
  • npm run lint → clean
  • npm run release:check → "Release validation passed for Markdown Clipper 1.1.0."

🤖 Generated with Claude Code

The in-page panel dynamically imports src/lib/settings.js, which reaches
src/lib/slug.js through settings-schema.js and template.js. slug.js was
missing from web_accessible_resources, so Chrome blocked that last hop
and the panel's settings read failed.

Traced the full transitive import graph from every content-script entry
point; slug.js was the only file missing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rsmedstad
rsmedstad merged commit 7d1561b into main Jul 20, 2026
2 checks passed
@rsmedstad
rsmedstad deleted the fix/web-accessible-slug branch July 20, 2026 19:17
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.

1 participant