A lightweight Firefox WebExtension that generates QR codes for the current page URL. Built with TypeScript, HTML, and CSS with zero runtime dependencies.
- One-click QR code generation for any webpage
- Keyboard shortcut (Alt+Q) for quick access
- Copy to clipboard as PNG image
- Download QR code as PNG file
- Zero external dependencies at runtime
- Privacy-focused - all processing happens locally, no data leaves your browser
- Minimal permissions - only uses
activeTabpermission
Click the badge above to visit the official Firefox Add-ons page and install QR-Fox directly in your browser.
The following instructions explain how to build an exact copy of the QR-Fox add-on from source code.
- Operating System: Windows, macOS, or Linux (x64 or ARM64)
- Build Environment: Command line terminal (bash, zsh, PowerShell, or Command Prompt)
To build QR-Fox, you must install the following programs:
QR-Fox requires Node.js version 22 or later to build. npm is included with Node.js.
Installation:
- Download Node.js: Visit https://nodejs.org/ and download the LTS version (22.x or later)
- Verify installation:
node --version npm --version
Expected output (minimum):
- Node.js: v22.0.0 or higher
- npm: 10.0.0 or higher
-
Clone the source code repository:
git clone https://github.com/dodbrian/qr-fox.git cd qr-fox -
Install build dependencies:
npm install
-
Run the build script:
npm run build
This executes all necessary technical steps:
- Compiles TypeScript source files to JavaScript
- Copies static files (icons, HTML, CSS, locales)
- Generates the complete extension in the
dist/directory
The
dist/directory will contain an exact copy of the add-on ready for installation, including:manifest.json- Extension configurationbackground/- Background scriptpopup/- Popup UI and QR generation logicicons/- Extension icons_locales/- Internationalization files
-
(Optional) Create installable package:
npm run pkg
This command performs validation, testing, builds the extension, and packages it as a
.xpifile inweb-ext-artifacts/:- Runs all quality checks (format, lint, i18n validation)
- Executes the test suite
- Compiles the extension
- Creates a
.xpipackage ready for Firefox installation
Note: The
.xpipackage is created locally and must be signed through Mozilla's signing service before it can be distributed on addons.mozilla.org. -
(Optional) Run full validation:
npm run validate
This runs all quality checks without creating a package:
- Code formatting check
- TypeScript and JavaScript linting
- Test suite execution
- i18n translation validation
Option 1: Load unpacked extension (for testing)
- Open Firefox and navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Navigate to the
dist/directory - Select
manifest.json - The extension will load and be available for testing
Option 2: Install signed package
- Navigate to the
web-ext-artifacts/directory after runningnpm run pkg - Open the
.xpifile in Firefox (double-click or drag into Firefox window) - Follow the Firefox installation prompts
| Script | Command | Description |
|---|---|---|
| Build extension | npm run build |
Compile TypeScript and copy files to dist/ |
| Build tests | npm run build:tests |
Compile TypeScript scripts and tests |
| Format code | npm run format |
Format all files with Prettier |
| Check format | npm run format:check |
Verify formatting without modifying files |
| Lint code | npm run lint |
Check TypeScript and JavaScript for style |
| Run tests | npm test |
Execute Jest test suite |
| Run validation | npm run validate |
Run all checks (format, lint, test, i18n) |
| Build and launch | npm run start |
Build and launch Firefox with extension |
| Create package | npm run pkg |
Validate and create signed .xpi package |
dist/- Compiled extension ready for loading in Firefoxbuild/- Compiled TypeScript files (internal build directory)web-ext-artifacts/- Signed.xpipackages (generated bynpm run pkg)
If the build fails:
- Verify Node.js version:
node --version(must be 22+) - Clear node_modules and reinstall:
rm -rf node_modules npm install
- Ensure you have sufficient disk space and write permissions
- Click the toolbar icon or press Alt+Q on any webpage
- A popup displays the QR code for the current URL
- Copy the QR code as PNG to clipboard
- Download the QR code as a PNG file
qr-fox/
├── src/ # Source code
│ ├── background/ # Background service worker
│ ├── popup/ # Popup UI and QR generation
│ ├── icons/ # Extension icons (SVG/PNG)
│ ├── _locales/ # Internationalization (i18n)
│ └── manifest.json # Extension manifest
├── __tests__/ # Jest test suite
├── scripts/ # Build and utility scripts
├── assets/ # Asset files (images, etc.)
├── docs/ # Documentation and assets
├── dist/ # Compiled extension (generated)
└── .github/ # GitHub workflows (CI/CD)
- TypeScript - Type-safe development with strict mode
- ES Modules - Modern JavaScript module system
- Jest - Testing framework
- ESLint - Code quality and style enforcement
- Prettier - Code formatting
- web-ext - Firefox extension development and packaging
For a complete list of all available build commands, see the Build Scripts Reference section in the Build Instructions.
For developers interested in extending or contributing to QR-Fox, here are some valuable resources:
- Mozilla Add-on Developer Hub - Resources for extension development, publishing, and managing your extensions on addons.mozilla.org
- Mozilla WebExtensions Documentation - Comprehensive guides and references for building Firefox extensions with the WebExtensions API
- Extension Signing and Distribution Overview - Details about Firefox's extension signing process and distribution options
- Add-ons Server API v4 Signing Documentation - Technical documentation for the API used to programmatically sign Firefox extensions
- Follow TypeScript strict mode
- Add tests for new features
- Run
npm run validatebefore committing - Use conventional commit format:
<type>(<scope>): <subject>
MIT License - see LICENSE file for details
QR code icon sourced from Freepik
- Firefox 115+
- Manifest V3
QR-Fox processes all data locally in your browser. No information is transmitted to external servers. The extension only requests activeTab permission to read the current page URL.

