搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

I'm an Add-on developer, I want to pack extension which has jquery libraries?

  • 2 个回答
  • 2 人有此问题
  • 62 次查看
  • 最后回复者为 ahmedsamir

more options

I'm an Add-on developer, I want to pack my extension which has Jquery libraries and get its skeleton folder?

I'm an Add-on developer, I want to pack my extension which has Jquery libraries and get its skeleton folder?

所有回复 (2)

more options

I am also addon developer. I use it like this :-

I use the following example.xul:

<overlay id="example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <head></head> <script type="application/x-javascript" src="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 for website
       if (!doc.location.href.match(/^http:\/\/(.*\.)?stackoverflow\.com(\/.*)?$/i))  
           return;
       // Check if already loaded
       if (doc.getElementById("plugin-example")) return;
       // Setup
       this.win = aEvent.target.defaultView.wrappedJSObject;
       this.doc = doc;
       // Hello World
this.main = main = $('
').appendTo(doc.body).html('Example Loaded!');
       main.css({ 
           background:'#FFF',color:'#000',position:'absolute',top:0,left:0,padding:8
       });
       main.html(main.html() + ' - jQuery ' + $.fn.jquery + '');
   };
   // Bind Plugin
   var delay = function(aEvent) { 
       var doc = aEvent.originalTarget; setTimeout(function() { 
           example.run(doc,aEvent); 
       }, 1); 
    };
   var load = function() { 
       gBrowser.addEventListener("DOMContentLoaded", delay, true); 
   };
   window.addEventListener("pageshow", load, false);

})();

more options

we have this problem on firefox add-on validation: "Your add-on includes an JavaScript library file (jQueryUI) that doesn't match our checksums for known release versions. We require all add-ons to use unmodified release versions, obtained directly from the developer's website. You can find a list of the library versions we support here: http://mzl.la/amo-libs"

we downloaded Jqueryui from http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.js and then we got its hash from https://github.com/mozilla/amo-validator/blob/master/validator/testcases/hashes.txt it was "324b0783a50c21c9b2a105b39b7cd1767e8d44f288f08be5f6e2267d5ad83920" how can we add it to harness-options.json ?