Firefox: Installing old extensions in new releases

Yesterday, I wrote about changing your browser title and it was found that the Titlebar Tweaks extension wouldn’t work with FF 1.5.x. After playing around with the extension, I was able to get it to work with FF 1.5.0.1. I also found, in the process, the way I got it to work also worked for other extensions that would error out if you tried to install them on newer versions of FF.

No, I didn’t re-write the code for the extension. The way I got it to work was by changing the maxVersion information for the installation. What does the maxVersion data do? From the Mozilla Developers site:

You should set minVersion to the minimum version you want to support and test your extension with. There is no shame in this being the latest version of Firefox. If you do not plan on testing your Extension with a given version, minVersion must be set to the newest version you are willing to test with. You should never set maxVersion greater than the current Firefox release. You do not know what we’re planning to do with the app in the future, and so you cannot reliably say that your Extension will be compatible.

NOTE: Some extensions will just not work with newer versions of Firefox without rewriting the code for the extension. In a nutshell, you are testing the extension in a new version of Firefox. If you try this tweak, and the extension crashes Firefox, start Firefox in Safe Mode and uninstall the extension.

Here are the steps I followed to make Titlebar Tweaks work with Firefox 1.5.01. These steps are generic so you can use them on any extension. Also, this work around is OS independent.

  1. Go to the Firefox Extensions site and download the extension you want by right-clicking and choosing Save Link As. Remember where you saved the file to on your system.
  2. Rename the file from .xpi to .zip (or any other zipped file extension). XPI files are just compressed files and the XPI extension is what Firefox reads to see that it is an installation file.
  3. Extract the file into a new folder.
  4. Open the folder where you extracted the files and open install.rdf with a text editor (notepad, wordpad, vim, etc.).
  5. Change the maxVersion (X.X is the version number for Firefox):
    < em:maxVersion>X.X< /em>
    to:
    < em:maxVersion>1.5+< /em>
  6. Save the file, overwritting the original.
  7. Copy the file, install.rdf, back into the compressed file and overwrite the original.
  8. Rename the compressed file by changing the extension back to .xpi.
  9. Open Firefox and drag the XPI file into the open window to install the extension.
  10. Restart Firefox for the installation to complete.

The extension should now show up in your list of extensions when you go to Tools -> Extensions. Again, if the extension is not compatible with the newer version of Firefox and the browser crashes, start Firefox in Safe Mode and uninstall the extension.

Screenshots
Firefox Extensions window:
Extensions window in Firefox

Titlebar Tweaks layout options:
Titlebar Tweaks layout options

Titlebar Tweaks custom browser name entry:
Titlebar Tweaks name options

(Article 10, Day 11)

31.Mar.06 Browsers, Technology


You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

Leave a Reply