How to edit the contents of XPI files shipped with Firefox?

(Leif) #1

I recently noticed some odd error message, and found an open bug report in Bugzilla. The file in question is an XPI shipped with the Mozilla Firefox installer.

The file in question is in /browser/features/ (bootstrap.js, which originates in mozilla-central/browser/extensions/aushelper/bootstrap.js), which I simply wanted to try to edit to see if I could scratch an itch, without having to download and learn to set up a fully blown VS2015 build environment from scratch, and all dependencies, and compile from source, just to edit 2-3 lines in a plain text JS file.

Although I have had a little experience with add-on development, and am familiar with using an unzip program to extract the archive, I was unable to simply unzip this XPI, as it was unrecognized by 7-Zip.

What’s the deal with these XPIs? Can’t seem to read any of them (in browser/features) as archives.