1

I've managed to run a content-script including the next line:

  $('head').append('<script src="TemplateData/UnityProgress.js"></script>');

as you might guess, it looks for affected-site.com/TemplateData/UnityProgress.js

but I need to point to a local script instead, which is packaged along with my extension:

manifest-dir/TemplateData/UnityProgress.js

how do i write it the right way? tried to play with file:/// prefix, but it doesn't seem to work. also the script is not mentioned in the manifest.json

please take in mind I'm a noob with javascript/manifest/extensions/web-programming and I may mess up things that seem basic/preunderstood

Filburt
  • 17,626
  • 12
  • 64
  • 115
Arty McLabin
  • 83
  • 1
  • 10
  • Just use a relative URL, so something without a scheme in front. – arkascha Sep 14 '15 at 21:22
  • Is this what you're after? http://stackoverflow.com/questions/10527625/google-chrome-extension-script-injections – NG. Sep 14 '15 at 21:27
  • Is the js code loaded from the server or are you running a local js file? – Aify Sep 14 '15 at 22:08
  • 1
    possible duplicate of [chrome extension: Injecting code which references a script that I am also injecting - why it fails?](http://stackoverflow.com/questions/8293465/chrome-extension-injecting-code-which-references-a-script-that-i-am-also-inject) – rsanchez Sep 14 '15 at 22:43

0 Answers0