https://github.com/eskander/ultra-popup-blocker
Configurable popup blocker that blocks all popup windows by default with a permission model.
https://github.com/eskander/ultra-popup-blocker
chrome firefox greasemonkey greasemonkey-script greasyfork openuserjs popup-blocker popup-window tampermonkey tampermonkey-script userscript violentmonkey violentmonkey-script
Last synced: 3 months ago
JSON representation
Configurable popup blocker that blocks all popup windows by default with a permission model.
- Host: GitHub
- URL: https://github.com/eskander/ultra-popup-blocker
- Owner: Eskander
- License: mit
- Created: 2019-07-15T18:26:06.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T01:40:41.000Z (9 months ago)
- Last Synced: 2024-10-26T12:16:07.931Z (9 months ago)
- Topics: chrome, firefox, greasemonkey, greasemonkey-script, greasyfork, openuserjs, popup-blocker, popup-window, tampermonkey, tampermonkey-script, userscript, violentmonkey, violentmonkey-script
- Language: JavaScript
- Homepage:
- Size: 706 KB
- Stars: 15
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **Ultra Popup Blocker**
Ultra Popup Blocker (**UPB**) is a lightweight popup blocker designed to **block all popup windows by default**—even user-initiated ones—unless explicitly allowed. It provides a simple yet effective [Permission Manager][whtlstid] to manage exceptions.
> [!Note]
> This project is in maintenance mode—no new features are planned.[](https://github.com/standard/standard)
## **Why Another Popup Blocker?**
Default popup blockers in Firefox and Chrome only block popups triggered automatically (e.g., on page load). However, some websites abuse popups by attaching them to any user interaction, including clicks on seemingly empty areas. **UPB** blocks these aggressive popups, giving you full control.
## **How It Works**
In JavaScript, functions are *first-class citizens*, meaning they can be stored in variables and modified. **UPB** takes advantage of this by overriding `window.open` with a custom implementation that prompts the user for confirmation before opening any popups.
**Note:** This is not a foolproof solution. For comprehensive protection, use **uBlock Origin** with the appropriate filter lists.
## **Managing Permissions**
The built-in **Permission Manager** allows you to whitelist websites that should be allowed to open popups freely.
## **Installation Instructions**
1. Install a **userscript manager** for your browser:
- **Firefox**: [Violentmonkey][ff_ext1] or [Tampermonkey][ff_ext2]
- **Chrome**: [Violentmonkey][cr_ext1] or [Tampermonkey][cr_ext2]2. Add **Ultra Popup Blocker** from one of the sources below:
[![GreasyFork][button1]][link1] [![OpenUserJS][button2]][link2] [![GitHub][button3]][link3]
[whtlstid]: #managing-permissions
[ff_ext1]: https://addons.mozilla.org/en-US/firefox/addon/violentmonkey/
[ff_ext2]: https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/
[cr_ext1]: https://chrome.google.com/webstore/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag
[cr_ext2]: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo[button1]: https://img.shields.io/badge/Install-GreasyFork-red.svg?longCache=true&style=for-the-badge
[link1]: https://greasyfork.org/en/scripts/387937-ultra-popup-blocker[button2]: https://img.shields.io/badge/Install-OpenUserJS-blue.svg?longCache=true&style=for-the-badge
[link2]: https://openuserjs.org/scripts/eskander/Ultra_Popup_Blocker[button3]: https://img.shields.io/badge/Install-GitHub-lightgrey.svg?longCache=true&style=for-the-badge
[link3]: https://github.com/Eskander/ultra-popup-blocker/raw/main/src/ultra-popup-blocker.user.js