PrivacyVeil: A privacy-first dark mode extension for Firefox/LibreWolf that respects ResistFingerprinting, requires zero permissions abuse, and keeps your browsing data completely localβno tracking, no analytics, no compromise.
- π Overview
- β¨ Features
- ποΈ Architecture & How It Works
- βοΈ Browser Compatibility
- π Requirements & Dependencies
- π₯ Installation Guide
- π Usage
- π Security & Privacy
- π€ Why This Name?
- β Development Time
- π Why I Created This
- π Contact
- π License
PrivacyVeil is a dark mode extension engineered specifically for privacy-conscious users running LibreWolf or Firefox with ResistFingerprinting (RFP) enabled. Unlike Dark Reader and other mainstream dark mode solutions, PrivacyVeil prioritizes security and privacy above all else.
Key Capabilities:
- Client-side dark mode injection without exposing color scheme preferences
- Intelligent site exclusion for pages with native dark mode
- Real-time brightness adjustment (60-100%)
- Context menu quick-exclude for problematic sites
- Zero external network requests or telemetry
- ~1,100 lines of fully auditable code (430 JS + 650 CSS/HTML)
- No Permission Abuse - Minimal permissions (storage, activeTab only)
- Zero Tracking - No analytics, no telemetry, no data collection
- RFP Compatible - Works perfectly with LibreWolf's ResistFingerprinting protection
- Client-Side Only - Dark mode applied locally, websites cannot detect preferences
- Open Source - Fully auditable ~1,100 lines of code
- Auto-Detection - Automatically detects sites with native dark mode (GitHub, Reddit, YouTube, etc.)
- Quick Exclude - Right-click context menu to exclude problematic sites
- Per-Site Control - Exclude specific sites if they don't render well
- Smart Defaults - Pre-configured to skip major sites with built-in dark mode
- Brightness Slider - Adjust darkness from 60% to 100%
- One-Click Toggle - Enable/disable dark mode instantly
- Easy Exclusion List - View and manage all excluded sites
- Quick Removal - Remove individual sites from exclusion list anytime
- Clear All - Reset all exclusions with one click
- No eval() or unsafe code - Zero dynamic code execution
- CSP Compliant - Respects Content Security Policies
- Minimal DOM Manipulation - Limited attack surface
- Sandboxed Execution - Runs within Firefox's secure extension sandbox
- No Form Interception - Never accesses sensitive data or credentials
- Lightweight - ~1,100 lines of code, minimal memory footprint
- Fast Loading - Applies dark mode before page renders
- Efficient Updates - Debounced MutationObserver for dynamic content
- Zero CPU Impact - Minimal processing overhead
- Automatic Cleanup - Proper resource management on page unload
Step 1: User Opens Website
Website Loads β content.js Injects β Reads Settings
Step 2: Settings Retrieved
browser.storage.local.get() β Returns:
{
enabled: true,
brightness: 90,
excludedSites: ['github.com', 'reddit.com']
}
Step 3: Dark Mode Decision
IF site NOT in excludedSites:
β
Add data-dark-mode="true" to <html>
β
Apply brightness filter if brightness β 100
β
Inject dark-mode.css styles
ELSE:
β Skip dark mode, show original colors
Step 4: CSS Activation
dark-mode.css detects [data-dark-mode="true"]
β
Applies dark colors to all elements:
ββ Background: #1a1a1e
ββ Text: #e8e6e3
ββ Links: #58a6ff
ββ Borders: #4a4a52
Step 5: Real-Time Updates
User changes settings in popup
β
background.js saves to storage
β
All open tabs receive message
β
content.js updates dark mode instantly
Step 6: Dynamic Content
MutationObserver watches for new DOM nodes
β
If page structure changes, re-apply dark mode
β
Debounced to prevent performance issues
WEBSITE CONTEXT (Untrusted)
ββ Can read data-dark-mode attribute β
ββ Cannot access extension storage β
ββ Cannot intercept communication β
ββ Cannot steal any data β
CONTENT SCRIPT (Sandboxed)
ββ Can modify DOM β
ββ Can read storage β
ββ Cannot access website localStorage β
ββ Cannot make external requests β
ββ Cannot execute website code β
EXTENSION CONTEXT (Trusted)
ββ Controls all storage β
ββ Manages all communication β
ββ Enforces settings β
ββ No external access β
ββ No tracking capability β
PrivacyVeil supports both Manifest V2 and V3, making it compatible with:
- β Firefox 109+ (Full support)
- β LibreWolf (All versions with MV3 support)
- β Chrome 88+ (Full support)
- β Edge 88+ (Full support)
- β Firefox Developer Edition (with MV2 enabled)
- β Older Firefox versions (pre-109)
- β Chrome <88 (Legacy support)
- Firefox 109+ OR LibreWolf (latest) OR Chrome 88+
- ResistFingerprinting support (optional but recommended for LibreWolf)
- No external dependencies
- No npm packages required
- No CDN resources
- ~1,100 lines of self-contained code
Install addon from here : https://addons.mozilla.org/en-US/firefox/addon/privacy-veil/ π₯°
Warning
Z-Index Layer & Search UI
The z-index layering system (used for proper visual hierarchy) may occasionally cause UI overlap issues during search operations, particularly when using browser search bars or autocomplete dropdowns on complex websites. This is a known trade-off between maintaining privacy protections and achieving pixel-perfect UI rendering.
Why This Trade-Off Exists: Privacy and security must sometimes take precedence over UI perfection. Implementing proper DOM isolation and z-index management protects your data and fingerprinting vectors, but can occasionally interact unexpectedly with complex website structures. We believe protecting your privacy is worth this minor visual compromise.
Contributing & Feedback: If you encounter UI issues or have suggestions for improvement, please open an issue or submit a PR on GitHub. We continuously work to improve PrivacyVeil while maintaining our privacy-first approach. Feel free to fork and modify the code to better suit your needs.
Philosophy: To gain better privacy and security protection, some UI refinement may need to be sacrificed. This is an intentional design choiceβwe prioritize your privacy over flawless aesthetics.
# Enable/Disable Dark Mode
1. Click PrivacyVeil icon in toolbar
2. Toggle "Dark Mode" on/off
3. Changes apply instantly
# Adjust Brightness
1. Open PrivacyVeil popup
2. Drag brightness slider (60-100%)
3. Lower = darker, Higher = lighter
# Exclude a Site
Method A (Popup):
1. Open problematic site
2. Click PrivacyVeil icon
3. Click "Exclude Current Site"
4. Page reloads without dark mode
Method B (Context Menu):
1. Right-click anywhere on page
2. Select "Exclude this site from dark mode"
3. Site added to exclusion list
# Manage Exclusions
1. Open PrivacyVeil popup
2. Scroll to "Excluded Sites" section
3. Click "Remove" to re-enable dark mode
4. Click "Clear All Exclusions" to resetNavigate to about:debugging β Inspect Extension β Storage tab:
// Default settings stored in browser.storage.local:
{
enabled: true, // Dark mode on/off
brightness: 90, // 60-100 (60=darkest, 100=lightest)
excludedSites: [ // Sites to skip dark mode
"github.com",
"reddit.com",
"youtube.com"
]
}Edit dark-mode.css to change colors:
:root {
--dm-bg: #1a1a1e; /* Background color */
--dm-text: #e8e6e3; /* Text color */
--dm-link: #58a6ff; /* Link color */
}β
No Fingerprinting - Dark mode applied client-side only
β
RFP Compatible - Works with LibreWolf ResistFingerprinting
β
No Data Collection - Zero tracking or analytics
β
No Network Requests - Completely offline operation
β
Minimal Permissions - Only storage and activeTab
β
No eval() or unsafe code execution
β
No external dependencies
β
No network access
β
No localStorage/sessionStorage (web APIs)
β
No form interception
β
No credential theft
β
No tracking pixels
β
CSP compliant
β
Sandboxed execution
β
~1,100 lines of auditable code
| Feature | PrivacyVeil | Dark Reader |
|---|---|---|
| Privacy | π’ Zero tracking | π‘ Unknown |
| Permissions | π’ Minimal | π‘ Broad |
| Code Size | π’ ~1,100 lines | π΄ 50,000+ lines |
| RFP Compatible | π’ Yes | π΄ Conflicts |
| Network Requests | π’ Zero | π΄ Potential |
| Open Source | π’ Fully | π’ Fully |
PrivacyVeil represents a protective layer that:
- π Veils your eyes from harsh light
- π Veils your privacy from fingerprinting
- π‘οΈ Veils your data from tracking
The name captures the essence: Privacy Protection + Dark Mode working together as one unified shield for your browsing experience.
Total Time: 2 hrs 50 mins 33 secs
- Development: 34 mins 33 secs
- Firefox Submission: 45 mins
This was my first time publishing an extension, and I encountered several issues:- The
manifest.jsonfile wasn't being detected in the root directory. - Faced multiple validation errors.
- Versioning issues also occurred.
- The
- README Writing: 31 mins
- Mermaid.js Diagram Creation: 1 hr
I wasn't familiar with Mermaid.js syntax, so extra time was needed to vibe code the mermaid js diagram.
During my OSINT research , I prefer to maintain privacy with LibreWolf and ResistFingerprinting enabled. I faced a dilemma:
The Problem:
- Dark Reader requires broad permissions and makes external requests
- Native Firefox dark mode is blocked by ResistFingerprinting (intentionally)
- Other extensions either tracked me or didn't respect RFP
- I was forced to use light mode for sensitive OSINT work
- I needed dark mode that was completely private and auditable
The Solution: I created PrivacyVeil - a dark mode extension that:
- Works perfectly with ResistFingerprinting
- Requires zero permissions abuse
- Makes zero external requests
- Is completely auditable (~1,100 lines)
- Keeps all data local
π§ Email: pookielinuxuser@tutamail.com
π± GitHub: @gigachad80
Licensed under the MIT License.
See LICENSE.md for details.
First Published: October 17, 2025
Last Updated: October 17, 2025
Version: 1.0.0
Status: β
Published on Firefox Add-ons Store
Made with β€οΈ for privacy-conscious security researchers, OSINT practitioners, and anyone who refuses to compromise privacy for comfort.
π PrivacyVeil: Your Privacy, Protected. Your Eyes, Comfortable.