Content scripts
Injects a small badge into every web page you visit, with an options page that moves it to the left or right edge.
Runs on Chrome, Edge, Firefox · Manifest V3 · Surfaces: content script, options page, background service worker · Styling: CSS · Level: beginner
Create this project
npx extension@latest create my-content --template content
cd my-content
npm install
npm run dev
What it is for
- A plain JavaScript UI injected into every page
- One position setting shared between an options page and a content script
- Starting point for content scripts that need preferences
First steps
- Run npm run dev to launch the extension
- Click Open options on the badge injected into the page
- Tick the setting and watch the badge move to the left edge
Source on GitHubDocumentation
extension.devDocumentation for extension.dev