DarkPanel development
Run DarkPanel's tests, package a build, contribute a change and check the licence.
Requirements#
Node.js 22 or later.
Commands#
npm ci
npx playwright install chromium # once, for the browser tests
npm test # unit tests
npm run test:e2e # browser tests (headless Chromium, local test pages)
npm run package # dist/darkpanel-<version>.zip and dist/graphite-dark-<version>.zip
npm run icons # re-render icons from assets/icon.svgThe browser tests serve local pages under made-up *.test domains and turn off Chromium's own popup blocker, so every block they see comes from DarkPanel. To use a specific Chromium build, set TEST_CHROMIUM to its executable path.
Project layout#
extensions/dark-panel/ the extension (manifest V3)
core/ rule model, matching and storage (no browser APIs; unit-tested)
content/ scripts injected into protected sites
ui/ the panel
themes/graphite-dark/ the theme
brave-policies/ optional Windows policy files
tests/ unit and browser tests
scripts/ packaging, icons, test helpersReport a bug#
Open an issue with:
- the DarkPanel version (shown in
brave://extensions) and the browser version; - the site, if it is public and safe to share, and its mode (Balanced or Strict);
- what you expected and what happened.
For sites with aggressive ads, describe the behaviour instead of linking to the site. Security issues go through the private channel in Privacy and security.
Pull requests#
- Fork the repository and create a branch.
- Run
npm ci, then make your change. - Add or update tests. Popup Guard behaviour changes need a browser test in
tests/e2e/. - Run
npm testandnpm run test:e2e. Both must pass. - Keep the extension free of network requests, remote code and new permissions unless the change requires them. Explain any new permission in the pull request and in
PRIVACY.md. - Describe what changed and why.
Code style: plain JavaScript modules, no build step and no runtime dependencies. Match the surrounding code. Rule logic belongs in extensions/dark-panel/core/, which must not use browser APIs.
Releasing#
- Update
versioninextensions/dark-panel/manifest.json,themes/graphite-dark/manifest.json(if the theme changed) andpackage.json. - Add an entry to
CHANGELOG.md. - Run
npm testandnpm run test:e2e. - Run
npm run package. - Commit, then tag with
git tag v<version>and push withgit push origin main --tags. - The Release workflow builds the zips and attaches them to a GitHub release for the tag.
Licence#
DarkPanel is licensed under the MIT licence. By contributing you agree that your contribution is licensed under the MIT licence.
Brave is a trademark of Brave Software, Inc. DarkPanel is not affiliated with Brave Software or Google.
Source: DarkPanel README (Development, License), CONTRIBUTING.md, RELEASING.md and package.json, checked 2 November 2026.