Sunday, August 8, 2010

How to block sneaky pop up windows?

Probably you've already encountered popup windows from LiveJasmin, 888.com and similar sites. Sometimes they can be blocked with a popup blocker, but other times they find a way to open their windows somehow. In these cases instead of blocking them you can close them automatically.

Here's how to do it:

For Firefox visit the GreaseMonkey manual and look up how to install GreaseMonkey and user scripts. These are pretty easy to do and when you are done, install this script:

if (window.location.hostname.match("livejasmin.com") ||
window.location.hostname.match("888.com"))
window.close();



This script checks every time a new page is opened if it's one of the unwanted pages (you can add more, of course), and if so, it closes it instantly.

Google Chrome has a built-in support for scripts, so you can use that. Opera ditto. Explorer too.

Have fun.

No comments:

Post a Comment