Yesterday I mentioned Firefox extensions inpassing. Let's fill in the blanks.
Firefox extensions come as .xpi files, which are just yet anotherextension for ZIP archives. Unpacked, extensions live in their owndirectory in the extensions/ subdirectory in your Firefox profiledirectory. Firefox profile directories live under ~/.mozilla/firefox ; the default profile is in .default .(Firefox randomizes the name of the profile directory, I believe dueto security concerns.)
A lot of Firefox's code is actually written in various interpretedlanguages, especially JavaScript, and Firefox extensions are prettymuch all interpreted. This means that you can do a lot of Firefox andextension hacking without ever having to rebuild from source; you justzap the interpreted files in place in your installed copy.
Firefox doesn't leave all of these files sitting around for you toedit; it bundles them up in various .jar files (pretty much all inthe chrome/ subdirectory). Fortunately .jar
One of the infamous trivial bugs in C code is accidentally writing' = ' instead of ' == ' in conditional expressions; you get assignmentinstead of equality checking. One common piece of advice for avoidingthis is to reverse the order of the check, putting the constant first.This way, if you accidentally write ' NULL = foo ' instead of the == version, you'll get a compile time error.
I can't stand to write this version, because it looks wrong to me.