javascript - dynamically deploying content scripts in chrome extensions -
i want deploy content scripts sites user wants deploy them to. have list of sites, , want deploy script.js these sites.
something (in background page):
chrome.tabs.onupdated.addlistener(function(tabid, changeinfo, tab) { if(changeinfo.status == "complete" && isinuserlist(tab.url)) { chrome.tabs.executescript(tabid, {file:"script.js"}, function() { //script injected }); } });
Comments
Post a Comment