A browser-extension template powered by Svelte
- Supports Chrome and Firefox
- History for frustration-free use
- Popup for persistent extensions
- SPA architecture for rapid development
- Svelte: Performant and reactive framework
- TypeScript: A strongly-typed superset of JavaScript
- Vite: Resource bundling and fast builds
- webextension-polyfill: A lightweight WebExtension API polyfill for Chrome
- Clone this repository or use it as a template
- Change fields in
manifest.json
: "name", "short_name", "description", and "author" - Replace icons in
public/
directory - Change
initialize
function insrc/main.ts
- Go to town!
For examples of using the WebExtension API and browser
, see:
src/main.ts > initialize
src/utils.ts > checkHistory
There are two manifest.json
files in this project to give you the choice of which manifest_version
that you want to use for your extension. As of September 2021, Chrome/Chromium-powered browsers support manifest v3 but Firefox does not. I have set the default to v2 to promote cross-browser extensions, but I will change that to v3 once Firefox adds support. That could be as early as early 2022.
Copyright © 2021 Sean McPherson