I have a script that executes a script, but in my case the script only runs when I click on the icon: I need in my case to automatically run/inject the script when the pages loads.
My code:
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});