Archive for May, 2006

Cleanzilla

Thursday, May 25th, 2006

Anti-porn site pornwar.info is hosting a contest, Cleanzilla, for creating a Firefox extension to help users avoid porn.

It was recently brought to my attention that there is a group out there working to create extensions for Firefox in an effort to make it the best internet browser for surfing porn on the web. Pornzilla, as they call themselves, have taken the open source browser Firefox, a personal favorite of mine, and worked to make it hyper-efficient at doing the very thing I am seeking to avoid.

Therefore, I have decided to return the favor, and begin an annual contest. PORN WAR.INFO will hold an annual showcase for aspiring and seasoned programmers seeking to gain greater recognition on the net.

Starting this March, I will hold the 1st Annual “Cleanzilla” Safer-Browsing Firefox extension contest.

The goal is to create a useful, innovative, and effective extension for the latest version of the open source Mozilla Firefox browser, which will help to create a cleaner, safer, browsing experience on the web.

There's about a week left in the contest. If the winning entry is good, I might use it -- I don't like to encounter pornography when I'm not looking for it.

Finding the textarea selection

Saturday, May 6th, 2006

A desperate web developer emailed me asking how make a bookmarklet that does something with the selected text, where the selected text is usually in a textarea.

He had tried using window.getSelection.toString(), but that doesn't work, because window.getSelection() is implemented in terms of DOM Ranges and it doesn't make much sense to have a DOM Range inside a textarea.

Here are some of the methods I tried:

Am I missing a sane solution that works in current versions of Firefox?