Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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
2  
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  
superuser.com ? –  Michel Kogan Jan 13 '10 at 13:21
1  
If you really must, you could use a different browser to open 'funny' webpages. –  Adriano Varoli Piazza Jan 13 '10 at 13:38
2  
Let me guess, hurr-durr.com –  Sathya Jan 13 '10 at 18:59

4 Answers 4

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.

NoScript

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

protected by slhck Dec 29 '12 at 10:56

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.