'Chrome Extension OnUpdate fired every time new tab created
I'm trying to create a chrome extension which detects if the user's page has been changed or has he switched to a new url. But whenever a new tab is created i then as well get the event. How can i avoid it?
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tabs) => {
if (changeInfo.url !== null && changeInfo.status == 'complete') {
console.log("URL CHANGED")
}
})
I want to log only when a website is loaded not the tab is created and loaded
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
