Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1694|回复: 3
打印 上一主题 下一主题

扩展相关

[复制链接]

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
跳转到指定楼层
楼主
发表于 2020-8-19 18:17:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 Qter 于 2020-8-19 18:45 编辑

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

web-ext run --firefox-profile [A PATH TO A FIREFOX PROFILE] --keep-profile-changes


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

使用道具 举报

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
沙发
 楼主| 发表于 2020-8-19 18:24:01 | 只看该作者
回复 支持 反对

使用道具 举报

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
板凳
 楼主| 发表于 2020-8-19 18:38:03 | 只看该作者
Extension behavior in Firefox
When 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.

回复 支持 反对

使用道具 举报

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
地板
 楼主| 发表于 2020-8-19 18:58:39 | 只看该作者
扩展发布
https://extensionworkshop.com/documentation/publish/distribute-for-desktop-apps/
第一种. addons.mozilla.org (AMO)
第二种: self-distribution  how to prepare the .xpi file for web installs.
第三种: policies.   打包到app中


回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-11-22 17:44 , Processed in 0.066726 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表