PopupGuard is a browser extension that helps close common website popups.
It tries to close:
- Promo and newsletter popups
- Sign-in and login popups
- Cookie popups (it tries safer choices like reject when possible)
It works on all websites by default. You can turn it off for one site or turn it off completely.
This repo is the source code for the PopupGuard extension.
- Turn PopupGuard on or off
- Turn popup types on or off (promo, login, cookies)
- Choose cookie mode (
Strict,Balanced,Off) - Disable PopupGuard on a specific website
- Manage the list of disabled websites
- See the last action PopupGuard took on the current site (debug panel)
- Clear debug data from the popup UI
Strict: tries reject/decline/close onlyBalanced: may open cookie preferences and try to save safer choices (for supported cookie systems)Off: PopupGuard does not interact with cookie popups
- Avoids hiding full sign-in pages (auth route guard)
- Tries not to close chat widgets
- Restores page scroll after popup/cookie overlays when possible
- Includes adapter-based handling for common cookie systems (OneTrust, Cookiebot, Didomi, TrustArc cleanup)
If you want to test on Firefox first:
- Install packages:
npm install- Build Firefox version:
npm run build:firefox-
Load it in Firefox:
-
Open
about:debugging#/runtime/this-firefox -
Click
Load Temporary Add-on... -
Select
dist/manifest.json
Firefox removes temporary add-ons after restart.
Important:
- Run
npm run build:firefoxagain before reloading in Firefox after code changes - If you run
npm run build, it switchesdist/manifest.jsonback to the Chrome/Edge version
- Install packages:
npm install- Build:
npm run build-
Load in browser:
-
Open
chrome://extensions(oredge://extensions) -
Turn on Developer mode
-
Click
Load unpacked -
Select the
dist/folder
- Build the Firefox version:
npm run build:firefox-
Load it in Firefox:
-
Open
about:debugging#/runtime/this-firefox -
Click
Load Temporary Add-on... -
Select
dist/manifest.json
Firefox removes temporary add-ons after restart.
npm run lint
npm test
npm run build
npm run build:firefox- Privacy policy template:
docs/PRIVACY_POLICY.md - Disclaimer template:
docs/DISCLAIMER.md - Release checklist:
docs/RELEASE_CHECKLIST.md - Store listing draft:
docs/STORE_LISTING.md
- Some websites may still need custom fixes later.
- Some cookie popups only offer
OKorAccept, so there is no perfect automatic action on every site. - PopupGuard is a convenience tool and should be used at your own discretion.
- Disable PopupGuard on any site where it causes issues or where you want manual control.
Happy browsing.