This directory contains the source code for the CyberTemp browser extensions, ensuring a native experience on both Chrome and Firefox.
| Browser | Manifest Version | Status | Path |
|---|---|---|---|
| Chrome | V3 | ✅ Stable | chrome/ |
| Edge | V3 | ✅ Supported (Chromium) | chrome/ |
| Brave | V3 | ✅ Supported (Chromium) | chrome/ |
| Opera | V3 | ✅ Supported (Chromium) | chrome/ |
| Firefox | V3 | ✅ Stable | firefox/ |
Note: The Chrome build is compatible with Chromium-based browsers (Edge, Brave, Opera). Use the chrome/ build for those browsers.
The extensions are built using a Next.js Static Export workflow. This allows us to use modern React features, TailwindCSS, and the Shadcn UI library to build a premium interface, which is then compiled into standard HTML/CSS/JS for the browser extension.
- Next.js App Router: Handles the UI routing within the extension popup.
- Build Script (
build-extension.js): A custom Node.js script that:- Runs
next buildto generate a static site. - Post-processes the output to be compatible with extension CSP (Content Security Policy).
- Renames
_nextfolders (underscores are restricted in some extension stores) tonext. - Extracts inline scripts to separate files to satisfy Manifest V3 requirements.
- Runs
Currently, the extensions maintain separate app directories but can share logic if configured. We use a monorepo-style approach where chrome and firefox are independent Next.js apps.
Chrome:
cd extensions/chrome
npm install && npm run build
# Load unpacked 'out' folder in chrome://extensionsFirefox:
cd extensions/firefox
npm install && npm run build
# Load temporary add-on 'out/manifest.json' in about:debugging- Code Style: Follow standard React/Next.js best practices.
- Testing: Always test in both Chrome and Firefox before submitting major changes, as API differences (especially around
chrome.runtimevsbrowser.runtime) can cause issues.