Hi,
I have read <a href="http://developer.mozilla.org/en/docs/Building_an_Extension">Building an Extension</a> and <a href="http://occidopagus.nl/firefox/emptysidebar/">Creating a Firefox sidebar</a>, and managed to create a simple empty sidebar.
Now I would like to extend this sidebar so that when I hover the mouse over a link in the browser it will somehow appear in the sidebar (this is not exactly what I want to do but it illustrates the problem...). I can create the sidebar and I have written code that registers a mouseover listener in the overlay code and triggers when I move the mouse over a link, but I don't understand how to connect the two.
I.e. How can the mouseover-callback get the sidebars dom-tree so I can add the link to it?
If someone could help me with this problem, either by giving me code, hints or pointing me to a extension that does something similar I would be most grateful.
Help creating an extension
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
Code: Select all
var sidebarWindow = document.getElementById("sidebar").contentWindow;
if (sidebarWindow.location.href == "chrome://yourextension/content/whatever.xul") {
sidebarWindow.yourNotificationFunction(anyArguments);
}