I want to write a Firefox extension that act开发者_运维技巧s 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! :)
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.
精彩评论