I want to get opened tabs but not opened empty new tabs, bookmarks tab, download tabs and etc. How can I do it?
Use *://*/*
where the first *
matches http
and https
, more info in the documentation.
chrome.tabs.query({url: '*://*/*'}, tabs => {
// process tabs here
});
If you want to include file://
tabs too:
chrome.tabs.query({url: ['*://*/*', 'file://*/*']}, tabs => {
// process tabs here
});