How thedusk4203/dblocker works
DBlocker is a user-controlled browser extension that protects selected sites from popup/redirect traps, click overlays, and unwanted embedded frames. The main workflow is: the user enables protection for a site, the page controller checks policy with the background context, and the page engine blocks detected behavior; the popup lets users review events and manage persistent allow rules. Chromium and Firefox have parallel implementations. The excerpts show controller messaging, policy checks, and parts of the page engine; some background dispatch details and other capabilities are documented or implied by message names but not fully sampled, so uncertain wiring is omitted.
Main entry points: chromium/background.js Chromium background · firefox/background.js Firefox background · src/controller.js Chromium controller · src/controller.js Firefox controller
Components 19
User controls
- Chromium popup
chromium/popup/popup.js - Firefox popup
firefox/popup/popup.js - Chromium settings
chromium/options/options.js - Firefox settings
firefox/options/options.js
Page protection
- Chromium controller
chromium/src/controller.js - Firefox controller
firefox/src/controller.js - Chromium page engine
chromium/src/page-engine.js - Firefox page engine
firefox/src/page-engine.js
Extension runtime
- Chromium background
chromium/background.js - Firefox background
firefox/background.js
Policy and state
- Chromium shared rules
chromium/src/shared.js - Firefox shared rules
firefox/src/shared.js - Chromium site matching
chromium/src/psl.js - Firefox site matching
firefox/src/psl.js - Chromium extension storage
- Firefox extension storage
Other components
- User
- Protected website
- Browser APIs
Connections 32
- User → Chromium popup: manages protection
- User → Firefox popup: manages protection
- User → Chromium settings: configures settings
- User → Firefox settings: configures settings
- Protected website → Chromium controller: loads page
- Protected website → Firefox controller: loads page
- Chromium controller → Chromium background: requests policy
- Firefox controller → Firefox background: requests policy
- Chromium controller → Chromium background: sends telemetry
- Firefox controller → Firefox background: sends telemetry
- Chromium background → Chromium controller: returns preparation
- Firefox background → Firefox controller: returns preparation
- Chromium background → Chromium site matching: matches site keys
- Firefox background → Firefox site matching: matches site keys
- Chromium background → Chromium shared rules: uses policy rules
- Firefox background → Firefox shared rules: uses policy rules
- Chromium background → Chromium extension storage: reads and writes
- Firefox background → Firefox extension storage: reads and writes
- Chromium popup → Chromium shared rules: loads and updates config
- Firefox popup → Firefox shared rules: loads and updates config
- Chromium settings → Chromium shared rules: loads and updates config
- Firefox settings → Firefox shared rules: loads and updates config
- Chromium popup → Browser APIs: queries tabs
- Firefox popup → Browser APIs: queries tabs
- Chromium settings → Browser APIs: uses extension API
- Firefox settings → Browser APIs: uses extension API
- Chromium controller → Browser APIs: sends messages
- Firefox controller → Browser APIs: sends messages
- Chromium background → Browser APIs: handles browser events
- Firefox background → Browser APIs: handles browser events
- Chromium page engine → Protected website: blocks page traps
- Firefox page engine → Protected website: blocks page traps