Add support for Manifest V3
Manifest V3 (MV3) is a new version of the manifest.json file, which also
comes with several API changes:
https://developer.chrome.com/docs/extensions/mv3/intro/
Therefore, this change does the following:
- Add a new target to the Makefile and release.bash scripts called
"chromium-mv3-beta"/"CHROMIUM_MV3" which target Chromium using
Manifest V3.
- Adapt the manifest.gjson template so it is compatible with Manifest
V3 when the target is "CHROMIUM_MV3".
- Adapt the source code (change the background page to a service
worker and change chrome.browserAction.* to chrome.action.*).
Also, the following change has been done:
- The "gecko-beta" target in the Makefile has been removed because in
the end we never released beta versions for Firefox, due to the small
user base there.
Change-Id: Ibedcd6651cd23aa3db359a1ef7c7b96a232f39a7
diff --git a/README.md b/README.md
index f5ab3eb..1ab9140 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,8 @@
Run `make all` to build the extension for all the available channels and
browsers. You can also run `make {target}` where `{target}` is one of the
-following: `chromium-stable`, `chromium-beta`, `gecko-stable`, `gecko-beta`.
+following: `chromium-stable`, `chromium-beta`, `chromium-mv3-beta`,
+`gecko-stable`.
Run `make clean` to clean all the release files (this removes the `out` folder,
which is where the release files are saved).
@@ -78,11 +79,11 @@
When testing the extension during development, you don't have to build the
extension each time you want to import an updated version to Chrome/Firefox.
Instead, run `go run generateManifest.go {browser}` once, where `{browser}` is
-either `CHROMIUM` or `GECKO`, and this will generate a `manifest.json` file for
-the specified browser in the `src` directory. Now, you can load the `src` folder
-directly in the browser in order to import the extension, which removes the need
-to build it. When the `manifest.gjson` file is modified, you'll have to generate
-the manifest again.
+`CHROMIUM`, `GECKO` or `CHROMIUM_MV3`, and this will generate a `manifest.json`
+file for the specified browser in the `src` directory. Now, you can load the
+`src` folder directly in the browser in order to import the extension, which
+removes the need to build it. When the `manifest.gjson` file is modified,
+you'll have to generate the manifest again.
To test translations, you might want to set your browser's locale. This section
tells you how to set the locale in