Get the urls of all the tabs in all windows using chrome extension Get the urls of all the tabs in all windows using chrome extension google-chrome google-chrome

Get the urls of all the tabs in all windows using chrome extension


You could do something like this:

chrome.windows.getAll({populate:true},function(windows){  windows.forEach(function(window){    window.tabs.forEach(function(tab){      //collect all of the urls here, I will just log them instead      console.log(tab.url);    });  });});


With chrome.tabs.query method, you can also simply do,

 chrome.tabs.query({},function(tabs){         console.log("\n/////////////////////\n");    tabs.forEach(function(tab){      console.log(tab.url);    }); });