I used this snippet of code in a extension, and instead of getting the website URL, I get something like
chrome.tabs.onUpdated.addListener( function (tabId, changeInfo, tab) {
if (changeInfo.status == 'complete') {
alert(window.location.href)
}
})
"chrome-extension://obajdahcbingpephpedlikkklaijpcgm/_generated_background_page.html"
Is there a way to get the URL of the actual site instead of the extension URL?