[Jslib] Re: include JSLib in extension
mozdev at larry.kasoff.name
Fri Jun 18 23:55:00 EDT 2004
Look at the XPI of Enigmail. It has included JSLIb in its extension for
a long time.
Henrik Gemal wrote:
> My extension Launchy is using JSLib functions. So JSLib needs to be
> installed for Launchy to work.
> But since Launchy got listed on update.mozilla.org I got some complains
> about Launchy doesn't work. This is of cause because people dont have
> JSLib installed.
> Now I like to include JSLib inside of Launchy. Can I do that and what's
> the smartest way?
> I've got it working by including a jslib directory inside my extension's
> jar file. The jslib directory contains the files that I use, mainly
> io/file functions.
> So instead of:
> <script src="chrome://jslib/content/jslib.js"/>
> I use:
> <script src="chrome://launchy/content/jslib/jslib.js"/>
> I also had to change JS_LIB_PATH in jslib.js from:
> const JS_LIB_PATH="chrome://jslib/content/";
> const JS_LIB_PATH="chrome://launchy/content/jslib/";
> To be fair I also changed JS_LIB_VERSION in jslib.js from:
> const JS_LIB_VERSION="0.1.168";
> const JS_LIB_VERSION="0.1.168-modified";
> Is this the best way to do it? Help!
More information about the Jslib