Firefox 附加选项卡特定按钮和脚本,类似于 Google Chrome 中的页面操作
我想编写一个 Firefox 扩展,其作用与内置 RSS 提要扫描器完全相同(作为练习)。它应该执行以下操作:
- 在每个新页面/选项卡加载时,它应该扫描页面内容以查找 RSS feed
- 如果页面中有 RSS feed,它应该在位置栏中放置一个按钮,用户可以单击该
- 按钮按钮,按钮下方应出现一个对话气泡(当您单击它时,对话气泡出现在书签星形下方的方式),其中包含有关提要和订阅它们的按钮的信息
所以我的主要问题是:
- 过程是什么为特定页面运行特定内容脚本?
- 使用这些脚本的结果来更新每个选项卡的每个位置栏按钮的对话气泡的过程是什么?
基本上,我试图弄清楚如何在 Firefox 中执行 Google Chrome 中的页面操作。
为了澄清,我想在 Firefox 中复制此功能:http://code.google.com/chrome/extensions/pageAction.html
请帮忙! :)
I want to write a Firefox extension that acts exactly like the built-in RSS feed scanner (as an exercise). It should do the following:
- On each new page / tab load, it should scan the content of the page for RSS feeds
- If there are RSS feeds in the page, it should put a button in the location bar that the user can click
- On clicking the button, a speech bubble should appear under the button (the way a speech bubble appears under the bookmarks star when you click on it), with information on the feeds and buttons to subscribe to them
So my main questions are:
- What is the process to run specific content scripts for specific pages?
- What is the process to use the results of those scripts to update the speech bubble for each location bar button for each tab?
Basically, I'm trying to figure out how to do in Firefox what Page Actions are in Google Chrome.
To clarify, I want to replicate this functionality in Firefox: http://code.google.com/chrome/extensions/pageAction.html
Please help! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题与这个问题类似:
如何使用 Firefox 进行特定于选项卡的 xul 控件
具有选项卡特定控制。通常(或者也许我错了),新添加的控件在所有不同的选项卡中都是相同的。从任何选项卡进行更改都会更改其在所有选项卡中的外观。
仍在寻找解决方案或想法。
This question is similar to this question:
how to have tab-specific xul control with firefox
to have tab specific control. Usually (or maybe I am wrong),the newly added control is the same one across all the different tabs. Change from any tab will change its appearance in all tabs.
still looking for solutions or ideas.