Created
November 21, 2012 16:51
-
-
Save fupslot/4125997 to your computer and use it in GitHub Desktop.
Chrome: Get Tabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var w = Components.classes["@mozilla.org/appshell/window-mediator;1"] | |
.getService(Components.interfaces.nsIWindowMediator); | |
var win = w.getMostRecentWindow("navigator:browser"); | |
for (var i = win.gBrowser.tabs.length - 1; i >= 0; i--) { | |
var browser = win.gBrowser.tabs[i].linkedBrowser; | |
var cd = browser.contentDocument; | |
var cw = browser.contentWindow; | |
var url = browser.currentURI.spec; | |
var favIcon = browser.mIconURL; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment