Adding background scripts to a firefox add-on -
i want add file(background.js) background script firefox extension. added content scripts main.js using following code.
var panel = panels.panel({ contenturl: self.data.url("panel.html"), onhide: handlehide, contentscriptfile: [self.data.url("js/jquery.js"), self.data.url("tipsy/jquery.tipsy.js"),, self.data.url("js/settings.js")] });
how add background scripts main.js file.
simply place file in lib
folder.
except scripts interact directly web content, javascript code you'll write or use when developing add-ons using sdk part of commonjs module.
essentially, backend script don't share variables content scripts/normal js. export
, require
variables between modules.
Comments
Post a Comment