I have just checked in a little hack that disables the window.open call
during onLoad and onUnload events, top-level scripts, and timeouts. This
should block 99% of pop-up or pop-under ads out there on the Web while
still allowing a page to open a window in response to a mouse click.
It'll be in today's trunk builds and on the 0.9.4 branch. To turn on
this feature, add this line to your prefs.js file (be sure to exit
Mozilla before editing prefs.js or your changes will be overwritten):
user_pref("dom.disable_open_during_load", true);
Please bear in mind that this is experimental, and it has some flaws: If
you hit the Stop button while a page is loading, then no calls to
window.open on that page will work. If this happens, just reload the
page. Please give this a try, and post feedback about how this feature
could be improved.
Thanks to Rob Ginda for contributing the original patch.
-Mitch