A browser extensions for Chrome, Opera & Firefox.
- Based on WebExtensions. It also includes a tiny polyfill to bring uniformity to the APIs exposed by different browsers.
- Your changes to CSS, HTML & JS files will be relayed instantly without having to manually reload the extension. This ends up saving a lot of time and improving the developer experience.
- You might need to specify different data variables based on your environment. For example, you might want to use a localhost API endpoint during development and a production API endpoint once the extension is submitted to the appstore. You can specify such data in the json files inside
config
directory. - You can also set custom data variables based on the platform (different variable for Chrome, FF, Opera).
- You can also set you own environment variables, by making your own
env/common.js
fromenv/common.js.example
, and filling in the placeholders, while keeping the single and double quotes surrounding your variable
- Run
pnpm install
- Run
pnpm run build
- Open Chrome/Opera browser and navigate to chrome://extensions
- Select "Developer Mode" and then click "Load unpacked extension..."
- From the file browser, choose to
./build/chrome
or (./build/opera
)
- Open Firefox browser and navigate to about:debugging
- Go to this firefox
- Click "Load Temporary Add-on" and from the file browser, choose
./build/firefox/manifest.json
The following tasks can be used when you want to start developing the extension and want to enable live reload -
pnpm run chrome:dev
pnpm run opera:dev
pnpm run firefox:dev
If you want to use lint or auto fix -
pnpm run lint
pnpm run lint:fix
Run pnpm run dist
to create a zipped, production-ready extension for each browser. You can then upload that to the appstore.
The content script console.log
messages are readable from the usual browser console of the inspector tool
The backend script console.log
messages are logged somewhere else
IMPORTANT we use the "debug" JS library. In order to see debug messages, you need to run localStorage.debug = '*'
in the consoles)
see debug wiki
Open the extensions page, make sure the "developer mode" is enabled, and open the page of the background script. There you'll have access to the Background script console log.