A Web Extension extension for setting up warnings, to avoid confusing staging and production environments.
First, make sure the project is built in the dist
folder, by running npm run build:all
.
- Open Google Chrome's extensions panel
chrome://extensions
. - Drag and drop the
dist
folder into that page. - There is a default rule enabled. To see it, go to http://example.com and you should see a banner. There should also be an icon in your toolbar.
Info: You might see an error message on the extension's card. This is due to a property in the manifest that is required by Firefox, but not recognized by Chrome. It's fine for testing, but later, we'll need to build a different package for each browser.
Tip: If you edit the code, you'll need to refresh the extension in Chrome's extensions panel. To open the developer console for the
background.js
script, you can click on "Inspect the background page", in that same panel.
Important: You need the Developer Edition of Firefox or Firefox Nightly, because the regular version won't allow you to use localStorage on temporary extensions, thus it will break.
- Open Firefox's module debugging panel
about:debugging
. - Click on "Enable module debugging".
- Choose "Load a temporary module", and select the
dist/manifest.json
file. - There is a default rule enabled. To see it, go to http://example.com and you should see a banner. There should also be an icon in your toolbar.
Tip: If you edit the code, you'll need to refresh the module in Firefox's debugging panel. To open the developer console for the
background.js
script, you can click on "Debug", in that same panel.
This project uses vue-i18n for internationalization.
Watches for changes in the VueJS popup, and makes it available at http://localhost:8080.
Builds the production VueJS popup in
dist/popup
.
Watches for changes in the
extension_src
folder and builds a development version indist/background.js
anddist/content.js
.
Builds the production version of
dist/background.js
anddist/content.js
.
Uses the
extension_src/manifest/index.js
file to builddist/manifest.json
.
Builds the production versions of the popup, background script, content script and manifest in the
dist
folder.