I use the following example.xul: <?xml version=”1.0″?> <overlay id=”example” xmlns=”http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul”> <head></head> <script type=”application/x-javascript” src=”https://stackoverflow.com/questions/491490/jquery.js”></script> <script type=”application/x-javascript” src=”example.js”></script> </overlay> And here is an example.js (function() { jQuery.noConflict(); $ = function(selector,context) { return new jQuery.fn.init(selector,context||example.doc); }; $.fn = $.prototype = jQuery.fn; example = new function(){}; example.log = function() { Firebug.Console.logFormatted(arguments,null,”log”); }; example.run = function(doc,aEvent) { // Check … Read more