Mozilla and browsers based on it (Galeon comes to mind) have built-in popup killers. In fact, it goes a step further and lets you
configure what information a website is allowed to query from your browser (such as screen resolution, color depth, etc). You can
also prevent certain sites (or all of them) from repositioning or resizing browser windows.
I'll only discuss how to disable popups here. The other features are similar. Edit the user.js file.
Let's say you want to disallow popups in general but you have a few "trusted" sites that you need to allow popups for. In this case,
you'd add something like this:
user_pref("capability.policy.default.Window.open", "noAccess");
This completely turns off popups. You'll see an error logged to the Javascript console whenever a site tries to open a window.
Now...to allow your trusted sites to open popups, add something like the following:
user_pref("capability.policy.allowpopups.sites", "http://www.anandtech.com
http://www.foobar.com http://www.blahblah.blah");
user_pref("capability.policy.allowpopups.Window.open", "sameOrigin");
This creates a new policy named "allowpopups" that overrides the default setting for those sites listed.
The annoying thing is that I know of no way to force Mozilla to reload the user.js file once you modify it. So after making changes,
you'll need to restart your browser :-/
BUT WAIT...there's more!
🙂
Recently, the Mozilla team recognized that this is a tedious way to disable the annoying popups while allowing the useful popups
to continue (lots of sites will use popups to display information about products, etc). It turns out most of the "annoying" popups
are created when the webpage loads or when you leave the page. You know the types of popups I'm talking about. The Mozilla
team added an option that specifically disables these types of popups that occur while a page is loading while allowing other
(legitimate) popups:
user_pref("dom.disable_open_during_load", "true");
Try this instead of the above capability policy stuff. Works pretty slick IMO.