MozillaZine

Editing an add-on to change its compatibility

From MozillaZine Knowledge Base

This article was written for Firefox and Thunderbird but also applies to SeaMonkey 2.

This article describes how to change an add-on's compatibility information to make it installable for versions of applications other than it's marked as supporting. This is an advanced method useful for those who want to redistribute the file, such as administrators. Simpler methods are available at Updating add-ons.

  1. Download to your computer a copy of the extension (the ".xpi" file).
  2. Extract (unzip) the .xpi file. It is simply a zipped file with an .xpi extension, so you should be able to use something like unzip or Stuffit-expander (on Mac) to extract it.
  3. Open the "install.rdf" file with a text editor such as Notepad. Find a tagline like this showing the "maxVersion" number (in this case 2.0, but it may differ depending on the extension): <em:maxVersion>2.0</em:maxVersion>
  4. Change the "2.0" to "3.0.*" or whatever you need (the * covers any minor updates to release versions). That tells the installer that the version can be installed with the corresponding version number of Firefox or Thunderbird.
  5. Optionally, to indicate that you modified the extension for your own private use, you can also edit the lines describing the author/contributor and version of the extension.
  6. Save the changes you made to the install.rdf file.
  7. Create a zip archive containing all the files that were in the original .xpi file, including your modified install.rdf file. Rename it to "myExt.xpi" or whatever you like. The crucial thing here is to use ".xpi" for the file extension.
  8. Strongly recommended: before installing the extension, make a temporary backup of your profile folder or at least of the "extensions" folder inside your profile folder, which contains the installed extensions. That way, if something goes wrong, you can revert the changes easily.
  9. Finally, install the extension: If it's a Firefox extension, open the .xpi file from Firefox and it should install. If it's a Thunderbird extension, install it via the "Tools -> Add-ons" menu.