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

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

web applications - Making Python scripts work on MAMP -

cocoa - Converting NSString to keyCode+modifiers for AXUIElementPostKeyboardEvent -