For workflow instructions, see the main CSSNR CONTRIBUTING.md.
To set local master as legacy
It is easier to delete and re-clone the repository; however, if you want to avoid doing that:
git branch -m master legacy
git fetch origin
git branch -u origin/legacy legacy
git remote set-head origin -a
git remote prune origin
git checkout masterTo get started clone the project and install the dependencies.
npm installNote: WXT launches a browser by default when you run dev.
See Browser Opening modify the browser or disable this behavior.
npm run devTo Load Manually, open Chrome and navigate to chrome://extensions/, enable "Developer mode",
and load the unpacked extension from the .output directory.
npm run dev:ffTo Load Manually, open Firefox and navigate to about:debugging#/runtime/this-firefox, then click "Load Temporary Add-on..."
and load the unpacked extension from the .output directory.
This requires the Android Debug Bridge (adb).
In another terminal (or without the watcher run npm build:ff).
npm run watch:ffEnable USB or Wireless Debugging, connect, and get your device name.
adb devicesThen run using your device name.
npm run android -- nameThis type checks the project, builds and zips to the .output directory.
npm run packageTo build the .output directory.
npm run buildTo build and create an archive in the .output directory.
npm run zip:chromeTo build the .output directory.
npm build:ffTo build and create an archive in the .output directory.
npm run zip:ffThis project uses the WXT framework.
To customize the config for development add a web-ext.config.ts to the project root.
The binaries allow you to pick which browser opens. To disable auto-opening set disabled: true.
// web-ext.config.ts
import { defineWebExtConfig } from 'wxt'
export default defineWebExtConfig({
binaries: {
firefox: 'C:/Program Files/Firefox Developer Edition/firefox.exe',
chrome: 'C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe',
},
// disabled: true,
})Additional notes on loading temporary/unpacked extensions.
To add a new locale:
- The source language is English, copy en.yaml
- Copy the exact format, including comments.
- Verify the correct file name: https://developer.chrome.com/docs/extensions/reference/api/i18n
- Verify the correct Mozilla name in
PROD_LANGUAGES: https://github.com/mozilla/addons-server/blob/master/src/olympia/core/languages.py - Add the Release Notes translation here release.yaml
Note: The process for adding and validating names for Mozilla was clearly designed by a foolish child.
The docs are built using VitePress and deployed to GitHub Pages.
To get started, clone the repository and run.
npm i
npm run docs:devThe site should now be available at: http://localhost:5173/
To generate an up-to-date contributors.json run.
npm run get-contributorsFor more details about VitePress see.
| Location | Description |
|---|---|
| docs | Documentation Root (Markdown files). |
| docs/public | Static Root (copied to docs root). |
| docs/.vitepress | VitePress Configuration Root. |
| docs/.vitepress/config.mts | VitePress Configuration File. |