I've tried different methods.. I need to access url outside the function
var url = '';
chrome.tabs.getSelected(1, function(tab){
url = tab.url;
});
console.log(url);
I've tried different methods.. I need to access url outside the function
var url = '';
chrome.tabs.getSelected(1, function(tab){
url = tab.url;
});
console.log(url);