添加 FF 应用程序菜单项(无需重启)

发布于 2024-11-28 13:59:17 字数 162 浏览 2 评论 0原文

我正在尝试创建一个无需重新启动的 Firefox 插件,并且在 Firefox 应用程序菜单中(最好在“选项”子菜单中)有一个菜单项。我在任何地方都找不到有关如何在无需重新启动的情况下向应用程序菜单添加条目的任何内容!我正在使用 Mozilla Addon Builder 构建它。任何和所有的帮助将不胜感激!

I am trying to create a Firefox add-on that is restartless and has a menu entry in the Firefox App Menu (preferably in the Options sub-menu). I cannot find anything anywhere on how to add an entry to the app menu while being restartless! I am building it with the Mozilla Addon Builder. Any and all help would be appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜是你 2024-12-05 13:59:17

事实上,确实没有办法做到这一点。 “正常”的无需重新启动的插件必须枚举所有打开的浏览器窗口并添加菜单使用 id="appmenu-popup"“手动”输入元素。它还必须监视正在打开的新窗口才能使那里也有同样的变化。虽然这已经足够复杂了(bug 675387 是为了通过允许使用像在不可重新启动的附加组件中一样覆盖)我强烈怀疑附加组件 SDK(附加组件生成器所基于的)根本不提供任何方法来执行此操作。毕竟,它仅适用于可以使用有限功能的附加组件。

In fact, there isn't really a way to do this. A "normal" restartless add-on has to enumerate all open browser windows and add a menu entry "manually" to the element with id="appmenu-popup". It will also have to watch for new windows being opened to make the same change there as well. While this is already complicated enough (bug 675387 is about making this simpler by allowing using overlays like in non-restartless add-ons) I strongly suspect that the Add-on SDK (that the Add-on Builder is based on) doesn't provide any way to do this at all. After all, it is only meant for add-ons that can live with a limited set of features.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文