Content Svelte

Shows a Svelte overlay on every web page you visit, with an options page that moves it from right to left.

Runs on Chrome, Edge, Firefox · Manifest V3 · Surfaces: content script, options page, background service worker · Styling: CSS · Level: beginner · Framework: svelte

Create this project

npx extension@latest create my-content-svelte --template content-svelte
cd my-content-svelte
npm install
npm run dev

What it is for

  • A Svelte overlay injected into every page, isolated in a Shadow DOM
  • One setting shared between a Svelte options page and a content script
  • Starting point for Svelte extensions that need preferences

First steps

  • Run npm run dev to launch the extension
  • Click Open options on the overlay injected into the page
  • Tick the setting and watch the overlay move to the left edge

Permissions it asks for

  • storage

extension.devDocumentation for extension.dev