how to access URL in extension chrome
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
let url = tabs[0].url;
// use `url` here inside the callback because it's asynchronous!
});
//This requires that you request access to the chrome.tabs API in your extension manifest:
"permissions": [ ...
"tabs"
]