firefox - Mozilla WebExtensions 对 Firefox 配置文件的支持

标签 firefox mozilla profiles

我想使用 WebExtensions 创建一个 Firefox 插件,这样就可以了;

  • 显示用户、已创建的 Firefox 配置文件列表
  • 能够切换个人资料

就像用户代理切换器(它构建在 Mozilla Addon SDK 之上)。观看https://www.screencast.com/t/Zj4AkTmFfA

我无法找到 https://developer.mozilla.org/en-US/Add-ons/WebExtensions 上的任何 api 引用访问配置文件列表或切换配置文件。

不确定 Mozilla 是否会从 WebExtensions 中删除对 Firefox 配置文件的访问,就像它们限制对 Firefox 首选项的访问一样 (about:config)。

最佳答案

恐怕目前没有 API 来处理用户配置文件。除了 MDN 上的列表之外,还有一个 list of APIs已获批准并正在实现。

但是,有一种中期可能性:您可以提交错误来请求对新 API 的支持。这并不一定意味着您的请求将被实现,但它确实意味着它至少会被讨论。有指南here关于如何做到这一点。

If none of these options address your situation, you can consider filing an API request. Before you do, please keep in mind:

  • The goal of WebExtensions is not to support every use case from legacy extensions. In most cases, the functionality you need can be
    built with WebExtensions APIs, but it requires some re-thinking and
    modification.
  • Generic or very broad bugs are hard to turn into actionable issues. Try to limit the focus if possible.
  • We do try to review all incoming API requests, but it takes time, so please be patient.
  • Do a search to see if the bug exists already.
  • Still want to file a new API? You can do so here.

请注意,有ideas对于 Firefox 57 后的文件系统访问:这可能至少用于显示不同的用户配置文件。

关于firefox - Mozilla WebExtensions 对 Firefox 配置文件的支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45179115/

相关文章:

javascript - 使用javascript关闭脚本未打开的窗口

css - LESS contrast() 函数

Maven 资源过滤破坏下载

scala - 我应该如何解决两个不同用户的登录身份验证问题?

c# - 将具有配置文件的网站转换为 Web 应用程序项目

html - 相当于-webkit-mask-image : -webkit-gradient in Mozilla Firefox?

javascript - 有人可以解释 setInterval 计数器如何工作吗?

javascript - Firefox 中的 mouseenter、mouseleave

webserver - 为什么有些服务器会响应 503 错误,除非我的用户代理以 "Mozilla"开头?

javascript - CSS 媒体查询不适用于 chrome 和 Mozilla 中预期的特定范围,并且未在其他浏览器中测试