javascript - Programmatic injection with content script - chrome extension -


so i'm working on plugin has multiple different scripts can executed @ times, problem fact google api doesn't allow me acces full chrome.* api through content scripts.

here examples tried, none of them seem work. note: newly injected scripts must able talk , forth background-scripts.

content script:

// gives error, since chrome.* isn't allowed in content scripts: chrome.tabs.executescript(null, {file: "script.js"});   // doesn't allow me talk content scripts: var s = document.createelement('script'); s.src = chrome.extension.geturl('script.js'); s.onload = function() {     this.parentnode.removechild(this); }  // html 5 workers try download scripts web server, doesn't work either. var worker = new worker('script.js'); worker.postmessage(); 

is there way of injecting content scripts through other content scrips javascript, , allowing new scripts talk , forth background scripts?

thanks


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -