Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently a colleague forwarded a website link to us saying it was a funny site. After you click on the link, you are stuck in an infinite loop of annoying alert boxes. The only way to stop that was by killing the browser from the task manager. After killing the browser session you couldn't use the restore session feature as it would again open the annoying site. Many of my colleagues lost important data due to this.

Can we write a small application/script/plugin which will stop the alert boxes and/or close the website when required? If yes, then which language is best suited to do it? or Is there any existing application which stops such malicious activities?

P.S : I am using Firefox and I don't want to migrate to any other browser (Chrome etc.)

share|improve this question

migrated from Jan 13 '10 at 13:34

This question came from our site for professional and enthusiast programmers.

How would you determine that it was an annoying alert box or a perfectly valid alert box from an unrelated web-site? The simplest solution is not to open 'funny sites' sent by colleagues or alternatively, implement a web proxy that prevents access to known bad sites (Dynablocker springs to mind but I've no idea what it is, I think I've seen it on a client site somewhere, I'm only prepared to put in as much effort as you here so haven't looked it up on the web). – Lazarus Jan 13 '10 at 13:19
Pretty much the best solution is to never follow links to sites that people say are funny. More often than not, they aren't at all funny. – Andy E Jan 13 '10 at 13:20
2 ? – Michel Kogan Jan 13 '10 at 13:21
If you really must, you could use a different browser to open 'funny' webpages. – Adriano Varoli Piazza Jan 13 '10 at 13:38
Let me guess, – Sathya Jan 13 '10 at 18:59
up vote 5 down vote accepted

At least two plugins for Firefox seems to be relevant: AlertCheck and AlertStopper.

share|improve this answer
AlertStopper was what I was looking for. Thanka a lot! – Deepak Singh Rawat Jan 13 '10 at 16:28
AlertChecker does not work for me. – stepancheg Aug 1 '10 at 19:49
... neither AlertStopper – stepancheg Aug 1 '10 at 19:52

You can use NoScript so that by default non-white-listed sites cannot run JavaScript in your browser.

This is one of my favorite plugins for Firefox. Safer browsing, less ads, less annoyance.


share|improve this answer

Firefox allows you to selectively restore only the tabs you want to restore after a force close, so this shouldn't be an issue. Chrome has a feature where after 3 or so alert boxes you get an option "don't show any more alerts after this one". I'm guessing that behavior wouldn't be too hard to write an addon that replicates.

share|improve this answer

Just try it on chrome and on the second pop-up check the do not let this site open any more dialogs then click ok and then you can close it

share|improve this answer
OP says "I don't want to migrate to any other browser (Chrome etc.)" so (I think) not an answer. – pnuts Nov 29 '12 at 11:02

You must log in to answer this question.

protected by slhck Dec 29 '12 at 10:56

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .