This is the code source for Misakey Cookie Webextension.
This project uses react-scripts-webextension
TARGET_BROWSER=firefox yarn start
.- Available value for
TARGET_BROWSER
:['chrome', 'firefox']
- Default value:
'firefox'
- output folder in
build/dev
TARGET_BROWSER=firefox make build
- Available value for
TARGET_BROWSER
:['chrome', 'firefox']
- Default value:
'firefox'
- output folder in
build/prod
make build-zip
- use
VERSION=<myversion> make build-zip
to get zip output with version in the name - output directly in
build
make zip-plugin-source-code
--> generate a zip of the source_code for reviewers- output folder in
build/source_code.zip
- Go to Menu -> More tools -> Extensions
- Enable
Developer mode
- Upload the generated folder (
chrome
orfirefox
) withLoad unpackaged extension
- The extension should be loaded
- Go to
about:debugging
in the url - Upload the generated folder (
chrome
orfirefox
) withLoad temporary module
- The extension should be loaded
- Enable
debugging of extensions
The main purpose of this script is to block unwanted requests before they are launched in the client browser.
It is based on the @cliqz/adblocker
library.
See engine README.md in ./engine
To test the new rules inside the plugin before pushing on the repo:
- Serve the files with
serverMockup.js
:yarn start-server-mockup
- Replace RESOURCE_URL in
src/addon/background/config.js
by'http://localhost:3005'
- Test the plugin on your browser as explained in Test on browser
To see how to add or remove rules in engine.bytes
and mainPurpose.json
file, see README.md in folder engine
.
The main purpose of this script is to hide cookies banners and other annoying content on the current page of the browser.
It is also based on the @cliqz/adblocker
library.
This folder stands for what is displayed in the extension popup in the browser.
The file manifest.json
indicates to the browser where to find each resources to execute.
It also handle permissions of the web extension and other configuration keys.
It has to be at the root of the final folder (build).
We generate the manifest file from a template according to target browser (script in /manifest
)
# Lint
yarn lint
A pre-commit hook is available to automatically run the linter before any commit (this way we can avoid "lint" commits)
To install it go to the devtools/git
folder and run ./pre-commit-install.sh
The code is published under GPLv3. More info in the LICENSE file.