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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -