I have a Greasemonkey script written in JavaScript, with a CSS component, and I’d like to publish them as a single Firefox addon. I’ve tried using the Addon Builder with the Addon SDK, but I haven’t had any success. I’ve also tried the User Script Compiler, to no avail. I’m just hoping someone could explain to me a simple way to package the .js file and the .css file as a Firefox addon, or how to user the Addon Builder to do this, since apparently what I’ve tried hasn’t worked. Please, let me know if you need any more information from me, and thanks for your help!
EDIT: This is my main.js file in the Addon Builder.
var data = require("self").data;
var pageMod = require("page-mod");
pageMod.PageMod({
include: "[http://www.trello.com/board/*", "https://www.trello.com/board/*"],
contentScriptWhen: 'end',
contentScriptFile: data.url("scrumello_beta.js")
});
Your match pattern is wrong. If you take a look at the documentation, you have to specify the protocol unless you are using a host-based pattern. The following will work:
If you want to include HTTPS connections as well then you should specify two patterns:
Other than that your
main.jsseems fine. The error message you get appears to be bug 750138 which is a bad interaction with the Add-on Builder Helper extension. Reinstalling the helper extension supposedly makes the issue go away.