如何发布仅用于本地安装的FireFox WebExtension? [英] How to publish a FireFox WebExtension for local installation only?

查看:83
本文介绍了如何发布仅用于本地安装的FireFox WebExtension?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何永久安装我的(玩具)WebExtension,而不必通过Mozilla插件(AMO)发布它,而我的扩展程序只是一小部分CSS hacks,不打算发布.

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.

要添加更多输入,我链接到的页面显示为

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

  1. 压缩扩展程序的文件编辑

这时,您的扩展名将包含一个目录,其中包含 manifest.json及其需要的任何其他文件-脚本,图标,HTML 文件等等.您需要将它们压缩到一个文件中,以便 上传到AMO.

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.

一个窍门是ZIP文件必须是扩展文件的ZIP文件 本身,而不是包含目录.

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

还有

Firefox中的打包扩展称为"XPI文件",它们只是 具有不同扩展名的ZIP文件.

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

上传到AMO时不必使用XPI扩展名.

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

在about:addons中,您可以从文件进行安装,但是无论我以何种方式打包扩展程序,我都会得到:

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.

推荐答案

您可以让扩展名由AMO签名,但不列出扩展名,或者您可以使用允许禁用签名的Firefox版本之一(夜间或非品牌版本)

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)

这篇关于如何发布仅用于本地安装的FireFox WebExtension?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆