get url of all tabs in a firefox window (if posssible all ff windows)

Posted by encryptor on Stack Overflow See other posts from Stack Overflow or by encryptor
Published on 2010-05-14T05:16:03Z Indexed on 2010/05/14 5:24 UTC
Read the original article Hit count: 322

Filed under:
|
|

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.gBrowser;

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?

© Stack Overflow or respective owner

Related posts about firefox

Related posts about url