How to install Firefox add-ons directly from GitHub
Not all but several Firefox add-on projects are hosted on the project hosting website GitHub. This means among other things that the source code of the extension and often also its Firefox xpi installation file are offered there.
The Github version may be newer than the version on Mozilla's add-on repository due to the way updates are handled.
The most recent version of Canvas Blocker for instance is 0.1.4 on Mozilla's website and 0.1.5 on GitHub.
New versions are sometimes listed on the complete version history page on Mozilla's site but that is not always the case.
A new version may introduce new features or improvements, and it is usually a good idea to install to because of that.
Installing Firefox add-ons hosted on GitHub
There are two main methods that allow you to install add-ons hosted on GitHub. Please note that these methods may not work anymore in Stable and Beta builds of Firefox once Mozilla introduces add-on signing in the browser.
Method 1: The manual way
While on GitHub, locate the download button on the website and click on it. This downloads the whole project as a zip file to the local system.
Extract the zip archive on your system, locate the xpi file in it and drag & drop it into a Firefox window.
Firefox displays an installation prompt once you let go of the mouse.
Click install to add the add-on to the browser or cancel to stop the installation at this point.
Method 2: The easy way
Download and install The GitHub Extension Installer add-on for Firefox. The browser add-on adds a new "add to Firefox" option to GitHub pages that host Firefox add-ons that you can click on to install it directly from the site without having to download and extract its archive first.
The installation itself happens silently in the background but you will get a prompt if a restart is required to complete it.
While it is definitely easier than the manual way, it works only if the install.rdf file is in the project root.
While that is the case for some projects, it is not for all which means that this particular method won't work in that case.
Some projects don't list xpi files directly. If that is the case you find them listed on the releases page of the project. Simply add the /releases/ directory to the end of the address and you should get there.
I wonder if anyone ever went to Github with the intention of installing more than one Firefox extension from there on that visit.
Well, it is probably useful to some users who hang out on GitHub regularly and follow several projects.
FWIW, I have. Reason: when helping to beta testing “dev” branch extensions, those bleeding-edge versions aren’t yet available via AMO. Off the cuff (from memory) here are a few I would probably check “all during one visit”:
I think the title of this post would make more sense if it was “How to install Firefox add-ons directly from GitHub”.
I got tired of the enormous amount of attacks on my computers. So I uninstalled Silverlight. I stopped installing Java 10 years ago. I stopped installing Adobe Flash Player NPAPI. I stopped installing Firefox and Opera. Now my only browser is Google Chrome. Your computers will love you if you do this too. Windows 10 is very stable if you don’t use them. I haven’t had any trouble with it after I stopped using those. :)
Our computers will love us for not using an unfinished OS and an unstable google botnet
Our computers are stable without them
Newsflash. Firefox and Opera > Chrome
And yes, I know Opera is now based on the Chromium engine, it’s still better than Chrome.
Does also work as an auto-updater?
Where the extension is retrieved from, installed from, has zero bearing on any “autoupdater” functionality that extension may contain.
An “xpi” file (firefox “extension” file) is simply a zipfile. To see what a given xpi files contains, instead of clicking to install… you could right-click and “SaveAs” (might be labeled “Save target as”) and either replace the .xpi of the filename with .zip or tack .zip onto the end of its filename (some_extension.xpi.zip)… then clicking will open it as a normal zipfile and you can explore its contents.
Packed Inside an xpi file, you’ll find a “manifest” file and an “install.rdf” file. When firefox reads the install.rdf, its parser looks for, among other lines, a line stating the extension author’s project “homepage” as well as a line stating the “update_url” for the extension. If the author has chosen to leave the update_url line blank (or omit it altogether from the shipped install.rdf), no auto-updates will occur — cannot occur for that extension, even if you have set the firefox preference extensions.autoupdate.enabled=true
This is a great addon, I wonder how Mozilla’s forcing signed addons only will affect the usability of been able to install from git hub projects.
Very nicely written article.
This is a great tool for developers, I can go to old commits and install from there, which is extremely handy, like if a feature broke i repeat this process (of installing previous commit) till i find commit where the feature worked.