I would like to access the variable 'url' outside the chrome.tabs.query and edit my html file.
my js code:
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
url = tabs[0].url;
alert(url)
});
Any ideas on how I could go about doing this?