chrome.tabs.query({currentWindow: true, active: true}, function(tabs){
console.log(tabs[0].url);
});
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
let url = tabs[0].url;
// use `url` here inside the callback because it's asynchronous!
});