Skip to content Skip to sidebar Skip to footer

Addon Attaches Script Just Fine With Jpm Run, But Not With The Actual Xpi

I'm still fairly new to the addon-sdk and have run into a for me unexplainable problem. So far, I've been using jpm run to test everything - and it all works great. Now, I'm gettin

Solution 1:

Well, I managed to fix this problem.

Instead of manually attaching the script to the opened tab, I now use pagemod to attach the script whenever the the options page is opened.

var pageMod = require("sdk/page-mod");
pageMod.PageMod({
    include: "resource://protector/data/privacyProtector/options.html",
    contentScriptFile: "./privacyProtector/js/internalOptions.js",
    contentScriptWhen: "end",
    onAttach: sendSettings
});

This way, the options page works perfectly fine. I've encountered a new problem, but I'll ask a new question for it, so that this can be a stand-alone problem.

Post a Comment for "Addon Attaches Script Just Fine With Jpm Run, But Not With The Actual Xpi"