Ping (zestyping) wrote,
Ping
zestyping

How to get started developing an extension for Firefox 1.0 or 1.5.

I'm trying to write a Firefox extension, which i'm discovering means i have to create zillions of fiddly little files full of XML crap. There are a few good tutorials out there, like this one at borngeek.com, though they take some patience to work through. It took me a while to finally get something working. (The tutorial says "Creating a Firefox extension is easy," and other websites out there seem to all insist it isn't too hard, but it all seems awfully complicated to me. Writing all this boilerplate metadata makes me feel like i'm going through some sort of arcane hazing ritual for a fraternity invented by the bastard children of Tim Bray and Jamie Zawinski.)

So i hope this saves someone out there some time: helloworld-xpi.zip. This gives you a minimal framework to start from, with an example of a menu command and a toolbar button, and all the necessary files to make it work with both Firefox 1.0 and Firefox 1.5. There's a locale included as a starting point for internationalization. There's also a Makefile so you can just type "make" and it will pack everything into a single .xpi file for you. If you're using Firefox 1.5 on a Mac, "make link" will set up a link so that you can edit and see your changes without having to repackage and reinstall your extension.
Tags: code
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

  • 8 comments