I can retrieve the url of current tab in firefox using
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator);
var mainWindow = wm.getMostRecentWindow("navigator:browser");
var tabbrowser = mainWindow.gB开发者_StackOverflow社区rowser;
var url = tabbrowser.currentURI.spec;
Now i want to do it for all tabs and save it in a string and if possible get it for tabs in the other ff windows as well. How can i do that?
I have this requirement also, happens to find that you just got so close to the answer. Check this example in official document, it has all your needs. The key point is the window enumerator.
https://developer.mozilla.org/En/Code_snippets/Tabbed_browser#Reusing_tabs
精彩评论