Jquery version rejected

Hello our add-on was rejected for the following reasons:

  1. We generally don’t accept using the ‘eval’ function. There are many reasons not to use ‘eval’, and there are alternatives available. You can read more about it here: https://developer.mozilla.org/en/XUL_School/Appendix_C:_Avoid_using_eval_in_Add-ons
    data/injected.js (we will look at addressing this issue).

  2. Your add-on includes a JavaScript library file (jquery-2.1.4.min.js) that doesn’t match any versions known to us. We require all add-ons to use unmodified release versions.

We included jquery 2.1.4 in our add-on. It has the same md5 hash as the version on Google. Are we not able to include jquery in our add-on? Should we use version 2.2.0? Jquery has many warnings related to the use of eval.

https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
md5 hash - 4a356126b9573eb7bd1e9a7494737410

One last question, when we resubmit, do we have to wait another 3 weeks for it to be reviewed?

Thanks

Your JQeury is fine.

The following is a problem:
eval("(function(){return " + str + ";})()");

Also …
$('body').append("<div id=....

Thanks.

If we change it to use a private namespace, will that pass the test?
$(‘body’).append("<div id=… to

var $j_uniqueID= jQuery.noConflict();
$j_uniqueID(‘body’).append("<div id=…

Our add on is only used on pages configured by school administrators to assist with the login process.

Are you trying to figure out the version of your own
addon? From code running in that addon? If that’s the case, you can use
AddonManager.jsm to get that info - https://developer.mozilla.org/en-US/Add-ons/Add-on_Manager/AddonManager

Jpm actually should have that info in the self module.

Bootstrap addons can also access this info from the aData parameter.

The
$(‘body’).append(’<div id=’) uses unsafe innerHTML methods. We
prefer you try to use createTextNode/createElement baesed functions,
jquery has these -

Thanks we will make the necessary adjustments.

Problem is something else. It is using innerHTML or JQuery append on BODY when you are converting strings to DOM

Using innerHTML to modify a document causes the entire document to be re-parsed, which is inefficient and has critical drawbacks, including invalidating any JavaScript reference to replaced DOM nodes, clearing any JavaScript properties and event listeners on replaced DOM nodes, and re-executing any script tags in the changed markup, and causing said scripts to fail if they rely on document.write.
https://developer.mozilla.org/en/XUL_School/DOM_Building_and_HTML_Insertion

Thanks erosman. All issues have been corrected and the latest version has been uploaded. Only 99 in the queue!