MiniRot13

rot13 for the mozilla mail&news-reader
by Tobias Löfgren (owl@pinkroom.biz)

based on a mozillapatch by Gervase Markham (gerv@mozilla.org)

Install

To install just click the following link from a mozilla browser: minirot13.xpi. The installation should start automatically.

You can also have a look at the sourcecode.

Warning! This extension has not been tested on any recent versions of Mozilla/Firefox/Thunderbird!

I have tested it with Mozilla 0.9.9 and 1.0 on Windows 2000 and MacOS X without any problems, others have reported success with both Netscape 6/7 and other OS. It plays by the rules and should work just fine on other systems as well. I appreciate any feedback about where it works!

Usage

After you've installed minirot13 and restarted mozilla you simpy select "Rot13" from the contextmenu of the messagepane to rot13 the entire mail/article. When you are composing a message you select the text to encrypt and select "Rot13 Selection" from the context-menu. Couldn't be simpler. Note: Encrypting a text in the composer currently removes any html-formatting in the selected text.

Troubleshooting

If nothing at all happens when trying to install, make sure that you have checked "Enable software installation" in the "Advanced | Software Installation" page in the preference dialog. Some versions of Mozilla might have this disabled without showing it in the dialog: try unchecking and then rechecking the option to enable it.

I have not tried out Netscape 7 myself yet, but I have had reports that xpi-files are saved with the ending .txt when you click on them.

Try this

1. Download and save the minirot.xpi file to your HDD.
2. Make sure its name is "minirot13.xpi". If you have a filesystem that hides the filetype (".txt, .exe, .xpi") the filename should be "minirot13" and the filetype "xpi", make sure it's not a ".txt"-file!
3. Select "File | Open File" in Netscape and open the minirot13 file.

On variants on Linux you might find that you have problems with access-privileges. To install any xpi-plugin, you must have write access to some paths and files within the mozilla-installation. "chmod -R a+rw" on your mozilla dir will do the trick, but is probably somewhat reckless securitywise, and you might want to research this in more detail for your specific system and version of mozilla!

Some background

I like to read alt.humor.best-of-usenet. I also like the mozilla mail/news-reader. However I didn't like having to cut'n'paste rot13-encrypted posts into a seperate decoder page just to be able to read posts protected for the sensitive.

So off I went to bugzilla to check the status of a rot13-implementation for mozilla. I found a relevant call-for-feature (bug 66822), but it didn't really seem like much was going to happen anytime soon. A working patch to add the feature was availible, but it messed around with the internal files and didn't support encrypting parts of your own message in the composer.

Just the excuse I needed to get a crash course in XUL development for mozilla!

Reimplementing the patch as a separate dynamic XUL overlay was relativly straightforward and I had it running in an hour or two of understanding the mozilla source. I could have left it there. But no, I wanted the "rot13 of a selection in the composer window"-feature.

After struggling for hours I finally realized that I had no idea how to make an implementation that used either the Selection or the Range DOM-objects in a foolproof, crashproof way. So I decided on a simple two-minute shortcut and settled on a version that drops any html-formatting of the selection and just returns plain-text. If anybody out there has information about how to manipulate the contents of a selection in a mozilla Editor-object in an efficient way, please contact me!

And so here it is, neatly packaged as a XPI and ready to use. No more cutting and pasting to rot13 a message ever again!