Fabuloops wants to merge js-core-jquery-load-shortcut-deprecated into develop December 21

Fix jquery shortcut function 'load' deprecate

Current Status: Analysed View logs
View on GitHub

Not up to standards. This pull request quality could be better.

+6
Issues
-
Duplication
-
Complexity
-
Coverage

themes/core.js

Avoid assignments in operands
63
*/function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"===n(e)&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prot
The for-in loop variable 't' should be explicitly scoped with var to avoid pollution.
63
*/function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"===n(e)&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prot
Avoid assignments in operands
87
*/i()(document).ready(function(){a.a.on("updateCart",function(e){a.a.cart=e.reason.cart;var t=i()(".js-cart").data("refresh-url");if(t){var n={};e&&e.reason&&(n={id_product_attribute:e.reason.idProductAttribute,id_product:e.reason.idProduct}),i.a.post(t,n).then(function(e){i()(".cart-detailed-totals").replaceWith(e.cart_detailed_totals),i()(".cart-summary-items-subtotal").replaceWith(e.cart_summary_items_subtotal),i()(".cart-summary-totals").replaceWith(e.cart_summary_totals),i()(".cart-detailed-actions").
Always provide a base when using parseInt() functions
112
var c=s("editAddress"),l=s("use_same_address"),d=function(){i()(".js-edit-addresses").on("click",function(e){e.stopPropagation(),i()("#checkout-addresses-step").trigger("click"),a.a.emit("editAddress")}),i()("#delivery-addresses input[type=radio], #invoice-addresses input[type=radio]").on("click",function(){i()(".address-item").removeClass("selected"),i()(".address-item:has(input[type=radio]:checked)").addClass("selected");var e=i()(".js-address-error").prop("id").split("-").pop(),t=i()("#not-valid-addresse
Avoid assignments in operands
137
var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.confirmationSelector="#payment-confirmation",this.paymentSelector="#payment-section",this.conditionsSelector="#conditions-to-approve",this.conditionAlertSelector=".js-alert-payment-conditions",this.additionalInformatonSelector=".js-additional-information",this.optionsForm=".js-payment-option-form"}return function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(e,[{key:"init",value:f
Avoid assignments in operands
237
var T=null,C=null;function k(e,t,n){var r=i()(".product-actions"),o=r.find("#quantity_wanted"),u=r.find("form:first").serialize(),c=s("preview");c=null!==c?"&preview="+c:"",null!==n?e&&"keyup"===e.type&&o.val()===o.data("old-value")||(o.data("old-value",o.val()),C&&clearTimeout(C),C=setTimeout(function(){""!==u&&(T=i.a.ajax({url:n+(-1===n.indexOf("?")?"?":"&")+u+c,method:"POST",data:{ajax:1,action:"refresh",quantity_wanted:o.val()},dataType:"json",beforeSend:function(){null!==T&&T.abort()},error:function(e,

themes/core.js

Avoid assignments in operands
1
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModu
Avoid assignments in operands
28
!function(t,n){"object"===r(e)&&"object"===r(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(i,o){var a=[],s=i.document,u=a.slice,c=a.concat,l=a.push,d=a.indexOf,f={},p=f.toString,h=f.hasOwnProperty,v={},m=function e(t,n){return new e.fn.init(t,n)},g=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,x=/-([\da-z])/gi,b=function(e,t){return t.toUpperCase()};function w(
The for-in loop variable 'o' should be explicitly scoped with var to avoid pollution.
28
!function(t,n){"object"===r(e)&&"object"===r(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(i,o){var a=[],s=i.document,u=a.slice,c=a.concat,l=a.push,d=a.indexOf,f={},p=f.toString,h=f.hasOwnProperty,v={},m=function e(t,n){return new e.fn.init(t,n)},g=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,x=/-([\da-z])/gi,b=function(e,t){return t.toUpperCase()};function w(
Use ===/!== to compare with true/false or Numbers
39
function(e){var t,n,r,i,o,a,s,u,c,l,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),E=function(e,t){return e===t&&(d=!0),0},N=1<<31,A={}.hasOwnProperty,_=[],D=_.pop,L=_.push,q=_.push,O=_.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M="\\["+F+"*("+W+")
The numeric literal '.1' will have at different value at runtime.
39
function(e){var t,n,r,i,o,a,s,u,c,l,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),E=function(e,t){return e===t&&(d=!0),0},N=1<<31,A={}.hasOwnProperty,_=[],D=_.pop,L=_.push,q=_.push,O=_.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M="\\["+F+"*("+W+")
Avoid assignments in operands
39
function(e){var t,n,r,i,o,a,s,u,c,l,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),E=function(e,t){return e===t&&(d=!0),0},N=1<<31,A={}.hasOwnProperty,_=[],D=_.pop,L=_.push,q=_.push,O=_.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M="\\["+F+"*("+W+")
The for-in loop variable 'a' should be explicitly scoped with var to avoid pollution.
39
function(e){var t,n,r,i,o,a,s,u,c,l,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),E=function(e,t){return e===t&&(d=!0),0},N=1<<31,A={}.hasOwnProperty,_=[],D=_.pop,L=_.push,q=_.push,O=_.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M="\\["+F+"*("+W+")

themes/core.js

Avoid assignments in operands
88
*/(0,r.default)(document).ready(function(){i.default.on("updateCart",function(e){i.default.cart=e.reason.cart;var t=(0,r.default)(".js-cart").data("refresh-url");if(t){var n={};e&&e.reason&&(n={id_product_attribute:e.reason.idProductAttribute,id_product:e.reason.idProduct}),r.default.post(t,n).then(function(e){(0,r.default)(".cart-detailed-totals").replaceWith(e.cart_detailed_totals),(0,r.default)(".cart-summary-items-subtotal").replaceWith(e.cart_summary_items_subtotal),(0,r.default)(".cart-summary-totals
Always provide a base when using parseInt() functions
136
*/var s=(0,o.psGetRequestParameter)("editAddress"),u=(0,o.psGetRequestParameter)("use_same_address");(0,r.default)(window).load(function(){var e=(0,r.default)(".js-address-error:visible");if(0===parseInt(u)&&(0,r.default)("#invoice-addresses input[type=radio]:checked").trigger("click"),(null!==s||(0,r.default)(".js-address-form:visible").length>1)&&e.hide(),e.length>0){var t=(0,r.default)(".js-address-error").prop("id").split("-").pop();e.each(function(){l(!0,t,(0,r.default)(this).attr("name").split("-").p
Avoid assignments in operands
161
function(){var e=(0,r.default)("body");e.on("change","#js-delivery input",function(e){var t=(0,r.default)("#js-delivery"),n=t.serialize(),a=(0,r.default)(e.currentTarget).parents("div.delivery-option");r.default.post(t.data("url-update"),n).then(function(e){(0,r.default)("#js-checkout-summary").replaceWith(e.preview),(0,r.default)(".js-cart-payment-step-refresh").length&&(0,o.refreshCheckoutPage)(),i.default.emit("updatedDeliveryForm",{dataForm:t.serializeArray(),deliveryOption:a,resp:e})}).fail(function(e)
Avoid assignments in operands
233
*/var s=null,u=null;function l(e,t,n){var a=(0,r.default)(".product-actions"),l=a.find("#quantity_wanted"),f=a.find("form:first").serialize(),p=(0,o.psGetRequestParameter)("preview");p=null!==p?"&preview="+p:"",null!==n?e&&"keyup"===e.type&&l.val()===l.data("old-value")||(l.data("old-value",l.val()),u&&clearTimeout(u),u=setTimeout(function(){""!==f&&(s=r.default.ajax({url:n+(-1===n.indexOf("?")?"?":"&")+f+p,method:"POST",data:{ajax:1,action:"refresh",quantity_wanted:l.val()},dataType:"json",beforeSend:func
The for-in loop variable 't' should be explicitly scoped with var to avoid pollution.
233
*/var s=null,u=null;function l(e,t,n){var a=(0,r.default)(".product-actions"),l=a.find("#quantity_wanted"),f=a.find("form:first").serialize(),p=(0,o.psGetRequestParameter)("preview");p=null!==p?"&preview="+p:"",null!==n?e&&"keyup"===e.type&&l.val()===l.data("old-value")||(l.data("old-value",l.val()),u&&clearTimeout(u),u=setTimeout(function(){""!==f&&(s=r.default.ajax({url:n+(-1===n.indexOf("?")?"?":"&")+f+p,method:"POST",data:{ajax:1,action:"refresh",quantity_wanted:l.val()},dataType:"json",beforeSend:func

themes/core.js

Avoid assignments in operands
1
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModu
The for-in loop variable 'o' should be explicitly scoped with var to avoid pollution.
28
!function(t,n){"object"===r(e)&&"object"===r(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(i,o){var a=[],s=i.document,u=a.slice,l=a.concat,c=a.push,d=a.indexOf,f={},p=f.toString,h=f.hasOwnProperty,v={},m=function e(t,n){return new e.fn.init(t,n)},g=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,x=/-([\da-z])/gi,b=function(e,t){return t.toUpperCase()};function
Avoid assignments in operands
28
!function(t,n){"object"===r(e)&&"object"===r(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(i,o){var a=[],s=i.document,u=a.slice,l=a.concat,c=a.push,d=a.indexOf,f={},p=f.toString,h=f.hasOwnProperty,v={},m=function e(t,n){return new e.fn.init(t,n)},g=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,x=/-([\da-z])/gi,b=function(e,t){return t.toUpperCase()};function
The numeric literal '.1' will have at different value at runtime.
39
function(e){var t,n,r,i,o,a,s,u,l,c,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),_=function(e,t){return e===t&&(d=!0),0},E=1<<31,N={}.hasOwnProperty,A=[],D=A.pop,L=A.push,q=A.push,P=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R="\\["+M+"*("+F+")
Avoid assignments in operands
39
function(e){var t,n,r,i,o,a,s,u,l,c,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),_=function(e,t){return e===t&&(d=!0),0},E=1<<31,N={}.hasOwnProperty,A=[],D=A.pop,L=A.push,q=A.push,P=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R="\\["+M+"*("+F+")
Use ===/!== to compare with true/false or Numbers
39
function(e){var t,n,r,i,o,a,s,u,l,c,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),_=function(e,t){return e===t&&(d=!0),0},E=1<<31,N={}.hasOwnProperty,A=[],D=A.pop,L=A.push,q=A.push,P=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R="\\["+M+"*("+F+")
The for-in loop variable 'a' should be explicitly scoped with var to avoid pollution.
39
function(e){var t,n,r,i,o,a,s,u,l,c,d,f,p,h,v,m,g,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=oe(),S=oe(),j=oe(),_=function(e,t){return e===t&&(d=!0),0},E=1<<31,N={}.hasOwnProperty,A=[],D=A.pop,L=A.push,q=A.push,P=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R="\\["+M+"*("+F+")

Loading...

Loading...

Loading...

Loading...