Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 3 KB

README.md

File metadata and controls

46 lines (30 loc) · 3 KB

Ultra Popup Blocker

Ultra Popup Blocker (or UPB for short) is a lightweight Popup Blocker that aims to block all popup windows by default (even good, unharmful, user-initiated ones) unless permission is granted, while providing a clean Permission manager for configuration.

Note

Project in maintenance mode, no new features are planned.

JavaScript Style Guide

Why another popup blocker?

Built-in Firefox and Chrome popup blockers block popups that are created automatically (via scripts, on page load, etc...), while popups linked to user actions are allowed. However, some annoying websites will abuse this to spam you with popups anywhere you click in their pages, even seemingly blank places.

How does it work?

In JavaScript, functions are first-order citizens. It means you can store a function in a variable and pass it freely. You can also modify the native functions provided by the browser, like 'window.open'. Here, we override 'window.open' with our own implementation which prompts the user to see whether they really want to open a popup window. Note that this is not a bullet proof solution. If you want a comprehensive blocker, use uBlock Origin with the right lists.

Managing permissions

The permission manager included with Ultra Popup Blocker lists which websites you trusted to open popups freely.

Install instructions

  1. Get a userscript manager from your browser's addon store:
  2. Add Ultra Popup Blocker from one of the following sources:

GreasyFork OpenUserJS GitHub