I am trying to inject the contents of a script into a page and use
console.log("starting addon"); pageMod.PageMod({ include: "*",//tempopary contentScriptFile: self.data.url("testPreload.js"), contentScriptWhen: 'start'});
testPreload.js:
console.log('testPreload');
I see the "starting addon" in the log, and if I use contentScript:"console.log('testPreload')" instead of contentScriptFile , I also see "testPreload".
But when I use contentScriptFile , I see a "starting addon", but not "testPreload". What am I doing wrong?
EDIT Error: Error opening input stream (invalid filename?) Resource filePath: //jid1-ktaxagdysynpew-at-jetpack/extension/data/testPreload.js
firefox firefox-addon firefox-addon-sdk
Suhan
source share