Overriding Firefox’s Window.Alert – Part 4

So, I think I’m more or less done the extension.

Someday, when I’ve got more extension development experience under my belt, I’ll probably come back to this and fix it up.  Until then, this will have to do.

Click here to download.

If you’re interested in looking at the source, just change the file extension from “.xpi” to “.zip”, and decompress.  It’s all there.

There’s no license on this thing, no GPL, MIT, nothing.  Use it however you want.  If you find it useful though, I’d love to hear from you – send me email, post a comment, Facebook, Twitter, whichever.

Whew.  I think I’m going to reward myself with some orange sherbet.  Om nom nom…

Here’s a really annoying website to test the extension with.  I really don’t recommend that you visit it without my extension installed.

The window hops around a bit, so just double click on the location bar, and type in something like “http://www.google.ca”.  This will start up the flood of alerts, and (hopefully) you’ll be able to suppress them after the first one hits.

Here’s the site.  Visit at your own risk.

UPDATE:

I’ve moved the extension to Mozilla Addons, and added Firefox 3.5 compatibility.

I’ve updated alertCheck.xpi so that it’ll play nice with Firefox 3.0b5, and hopefully Firefox 3.1.*.  Let me know if there are any behaviour foulups, and I’ll do my best to fix them.

14 thoughts on “Overriding Firefox’s Window.Alert – Part 4

  1. Radu C

    Oh hey, how about you change the download link to a proper link?

    In Firefox, your link gets appended to your article path. That is obviously not found. Try putting http colon slash slash in front of the URL. That usually works in other browsers that aren’t IE.

  2. Mike

    @Radu C: Whoops, how embarrassing. 🙂 I’ve fixed the link, and updated the install.rdf to allow Firefox 3.1.*.

    Thanks for posting!

  3. Mike

    @Radu C: Oh, noticed a glitch with Firefox 3.0b5 which may have prevented the extension from working with 3.1.* as well. I’ve updated the file – mind giving it another go, and letting me know how it turns out?

    Thanks!

    -Mike

  4. Mike

    @Geofrey The concept, maybe. Somehow, though, I don’t think my code would pass muster for Mozilla. Too hack-y – note the ill-advised security bypass that I wrote about in Part 3.

    There are probably better ways of doing this, but I suppose this serves as proof of concept.

    Thanks for the vote of confidence, though. 😉

    -Mike

  5. Swapnil Pathare

    Hey Mike, great to see the FF plugin you’ve developed. Will check it out on my FF 3 soon.

    Mostly I just sit on my blog and rant away rather than actually sit and work stuff out, which could have been done in a lot of cases. However, it was nice to see it helping you 🙂 and nicer to actually have a comment posted by you inspite of me having done nothing.

  6. Wally

    Works great with 3.0.10 thanks alot dude! I cant tell u how many times ive been trapped in those endless alert loops lol but ummm why dont u put this on addons.mozilla.org so more peaople can find it?

  7. Mike

    @Swapnil: Thanks for the inspiration!

    @Wally: My pleasure. Maybe I’ll do the addons thing…I was treating the extension as more of an academic exercise than anything really serious, but if people are interested, I might put it up.

    I just hope nobody expects me to maintain it. 😉

    -Mike

  8. John

    Thank you! So much. This is great. I am very surprised this functionality isn’t part of Firefox already, as there are so many annoying malware sites out there. Great extension.

Comments are closed.