Introduction: Extract Firefox Addon Source Code

Picture of Extract Firefox Addon Source Code

This instructable will show you how to extract the source code from any Firefox addon. It requires nothing more than a ZIP extraction utility and a text editor if you choose to edit and repack the source.

Step 1: Locating an Addon's XPI File

Picture of Locating an Addon's XPI File

An XPI file is an addon packed into a single file. You need to get this file from the addons site without jumping right into the usual installation. Find the addon you want on the addons siteaddons site, and then locate its green installation button.

NOTE: Some addons require a license agreement to be accepted beforehand. In that case, the XPI file can be saved from the button on the license acceptance page, and not the addon page itself.

Instead of just clicking the button and having Firefox take over, right click and choose "Save Link As...". Once the file transfer is done, you will have the addon package right on your computer.

Step 2: Extracting XPI File

Picture of Extracting XPI File

Now that the file is on your computer, open up your personal ZIP extraction utility, and point it to the XPI file. In reality, XPI files are merely ZIP files renamed, so you can go ahead and extract the contents to a folder someplace. Common files outputted are...

install.js
install.rdf
/chrome/
/defaults/

With these files present, you're ready to move on.

Step 3: Extracting the Main JAR Code

Picture of Extracting the Main JAR Code

Most of the core addon code is present in a JAR file found in the /chrome/ directory. You'll find that just as XPI is a rename of ZIP, so is JAR (but to a lesser extent). Using the same extraction utility, you should be able to extract the main addon files from the JAR.

Step 4: That's It!

What you have now are most of the raw source files from the addon. You can modify them as you wish, and repackage them with the modifications. Opening XPI files in Firefox will install them for you.

Always respect an authors work, and make sure they allow you to use their code. Don't just take a popular addon, change the credits, and rehost it. That is just simply stealing.

Comments

admin (author)2008-11-08

Hey, this is a great instructable and is very informative. Just one thing is missing... pictures! It really helps a lot when trying to follow directions so you should consider taking some photographs. Once you do that and leave me a message when you have so that we can publish your work. Thanks! Thanks for the cool instructable and we hope to publish this soon!

mikellins (author)2016-09-25

Thanks. I have long lamented that Taboo was no longer supported, and then a developer picked up Taboo and modified it to work with later versions of Firefox, but then it was abandoned. I guess my only alternative now is to update myself.

parthom (author)2016-06-09

owo.

P.D.Chathuranga (author)2014-12-24

thanks .............. !!!!

AlexZ1 (author)2014-09-25

Very nice!!!

songokuze (author)2010-11-03

Very useful instructable, we're trying to dev the firefox plugin, so that we need to investigate other that works. Thanks for sharing!

About This Instructable

52,966views

6favorites

More by WB3000:Extract Firefox Addon Source Code
Add instructable to: