Qter 发表于 2020-8-19 18:17:08

扩展相关

本帖最后由 Qter 于 2020-8-19 18:45 编辑

https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/npm install --global web-extweb-ext requires the current LTS (long-term support) versions of NodeJS.

web-ext run --firefox-profile --keep-profile-changes


开发工作流
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Firefox_workflow_overview

Qter 发表于 2020-8-19 18:24:01

示例 https://github.com/web-ext-labs/ui-tool
脚手架 https://webextensions.in/

Qter 发表于 2020-8-19 18:38:03

Extension behavior in FirefoxWhen you develop an extension, assuming you've not defined an add-on ID using the browser_specific_settings key, the default behavior in Firefox is as follows:
[*]when using the Load Temporary Add-on feature in about:debugging your extension is assigned a new add-on ID each time you load it.
[*]when using web-ext, in addition to getting a new add-on ID each time you launch an extension it's also launched into a new profile.
[*]when a temporarily loaded extension is unloaded, local storage, such as that used by storage.local, window.localStorage, and indexedDB, is removed.
[*]when you stop Firefox, any temporarily loaded extensions are unloaded so aren't available when Firefox restarts. This includes extensions loaded with Load Temporary Add-on in about:debugging and web-ext.
The consequences of this behavior, when reloading an extension, is that:
[*]any data in local or sync storage is lost.
[*]any redirect URL becomes invalid.
[*]the extension will no longer be able to communicate with native apps or a PKCS #11 module.
[*]it will no longer be possible to send messages or create connections between extensions.
[*]you cannot test how the extension will behave if Firefox is stopped and restarted.
[*]browserAction positions are not carried over.

Qter 发表于 2020-8-19 18:58:39

扩展发布
https://extensionworkshop.com/documentation/publish/distribute-for-desktop-apps/
第一种. addons.mozilla.org (AMO)
第二种: self-distributionhow to prepare the .xpi file for web installs.
第三种: policies.   打包到app中


页: [1]
查看完整版本: 扩展相关