chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { if (changeInfo.status === 'complete' && tab.url.includes("portal.azure.com")) { chrome.scripting.executeScript({ target: { tabId: tabId }, files: ['content.js'] }); } });