-
-
Save rxw1/7799022 to your computer and use it in GitHub Desktop.
Count open tabs in Google Chrome.
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
chrome.windows.getAll({populate: true}, function(a) { | |
var n=0; | |
for (var x in a) { | |
n+=a[x].tabs.length; | |
} | |
console.log(n); | |
}); | |
// => undefined (?) | |
// => 154 :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment