Is this possible for chrome extension to get all the URLs in all tabs using chrome extension ?
I have got the url of current Tab using this code
chrome.tabs.getSelected(null, function(tab) { tabUrl = tab.url; alert(tabUrl); });
We need the following permissions in manifest.json file
"permissions": [ "tabs" ]
My question is to find out the URLs in all tabs ?
Press Ctrl + a on Windows/Linux or ⌘ + a on Mac to select all bookmarks. Press Ctrl + c on Windows/Linux or ⌘ + c on Mac to copy all urls (and only urls).
You can access the currently active tab and its properties via the query() method, for example: chrome. tabs. query({ currentWindow: true, active: true });
This looks like a down arrow, and it's located in the top right corner of the window. The Search Tabs popup window will now appear. An alternative way to get here is by using the keyboard shortcut: Shift + Command + A on Mac, or Control + Shift + A on PC.
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); }); }); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With