How to publish a FireFox WebExtension for local in

2019-09-16 19:23发布

问题:

How can I permanently install my (toy) WebExtension without having to publish it via Mozilla Addons (AMO), when my extension is just a small group of CSS hacks not meant to be published.

The other option, installing it only permanently would be cumbersome to do everytime I need the extension.

EDIT:

To add further input, the page I've linked to says

  1. Zip up your extension's files Edit

At this point your extension will consist of a directory containing a manifest.json and any other files it needs - scripts, icons, HTML documents, and so on. You'll need to zip these into a single file for uploading to AMO.

One trick is that the ZIP file must be a ZIP of the extension's files themselves, not of the containing directory.

and also

Packaged extensions in Firefox are called "XPI files", which are just ZIP files with a different extension.

You don't have to use the XPI extension when uploading to AMO.

In about:addons you can install from file, but whatever way I try to package my extension I get:

even after observing and trying the quoted passage above.

The temporary installation works fine.

回答1:

You can get your extension signed by AMO but leave it unlisted or you can use one of the Firefox builds that allow signing to be disabled (Nightly or unbranded builds)



回答2:

You can sign your extension by AMO without publish it.
Then just put an xpi file into

%appdata%\Mozilla\Extensions{ec8030f7-c20a-464f-9b0e-13a3a9e97384}

the browser will accept it.