如何让我的 Firefox 扩展工具栏按钮自动出现?
我创建了一个由工具栏按钮组成的 Firefox 扩展。 如何进行设置,以便在安装扩展程序时,该按钮自动出现在主工具栏中。 我不希望我的用户必须转到自定义工具栏菜单并将我的按钮拖过来。
I've created a firefox extension that consists of a toolbar button. How can I set it up so that when my extension is installed, the button automatically appears in the main toolbar. I don't want my users to have to go to the customize toolbar menu and drag my button over.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
来自 https://developer.mozilla.org/En/Code_snippets:Toolbar#Adding_button_by_default--
From https://developer.mozilla.org/En/Code_snippets:Toolbar#Adding_button_by_default --
我们正在使用以下代码......
We're using the following code....
我们使用以下代码来附加按钮(如果已经存在于栏中的其他位置)。
We are using the following code that will append the button (if already exist somewhere else in the bar).
这是我编写的一个小脚本片段,它在扩展程序第一次运行时向 Firefox 工具栏添加一个按钮: 首次运行时将扩展程序的工具栏按钮添加到 Firefox
Here is a small script snippet I write that adds a button to the Firefox toolbar the first time your extension runs: Add your extension’s toolbar button to Firefox at first run