且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用chrome扩展名获取所有窗口中所有选项卡的URL

更新时间:2023-12-05 19:34:16

像这样:

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);
    });
  });
});