i am creating a youtube chrome extension and try to load extension from background page automatically when any youtube video or channel page open but extension will not load untill i refresh same page again. i am using chrome.tabs.onUpdated.addListener to fire my script. i am already given tab permission on menifest.json file here is my background.js file is as
function checkForValidUrl(tabId, change, tab) {
if (change.status == 'loading' && change) {
//check for url is valid or not...and then load html through javascript
} }
chrome.tabs.onUpdated.addListener(checkForValidUrl);
thanks in advance.......