• Resolved tuomonurkkala

    (@tuomonurkkala)


    Hi there,

    After last woocommerce and few other plugin updates my cPanel size has risen a lot lately. The web hosting seems to accumulate extra content in the path public_html/wp-content/litespeed/js, which seems to be caused by some problem between the site and Litespeed’s Javascript optimization.?And I have no idea why this is happening. Can you help? ??

    Best Regards,

    Tuomo Nurkkala

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter tuomonurkkala

    (@tuomonurkkala)

    I opened one of these JS files and maybe there is clues for the problem?

    Here is one of many files:

    https://filetransfer.io/data-package/Y553lYZx#link

    mcdeth

    (@mcdeth)

    It’s normal, but you can limit it: https://docs.litespeedtech.com/lscache/lscwp/ts-optimize/#disk-space-filling-fast

    • This reply was modified 10 months ago by mcdeth.
    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    Okay, good to know! Now the cPanel is growing alot more than before. Before it was about 5% and now it is growing over 20% a day.

    I was wondering about this text:

    Visit your site, appending?/?LSCWP_CTRL=before_optm?to the end of the domain name (as in?example.com/?LSCWP_CTRL=before_optm), in two separate browsers or incognito windows.

    Should I open two browsers with the same ending on the URL or one?

    https://www.alusvaatteet.com/?LSCWP_CTRL=before_optm
    https://www.alusvaatteet.com/?LSCWP_CTRL=before_optm

    or

    https://www.alusvaatteet.com/?LSCWP_CTRL=before_optm
    https://www.alusvaatteet.com

    When I opened these (I have few websites):

    https://www.sukat.com/?LSCWP_CTRL=before_optm
    https://www.sukat.com/?LSCWP_CTRL=before_optm

    I found only these differences from this source file /?LSCWP_CTRL=before_optm:

    Row 2910: #widget-926 {
    Row 2910: #widget-176 {

    Row 2914: #widget-926 .widget-title {
    Row 2914: #widget-176 .widget-title {

    Row 3019: <div id=”widget-324″ class=”widget_nav_mega_menu shortcode-mega-menu “>
    Row 3019: <div id=”widget-112″ class=”widget_nav_mega_menu shortcode-mega-menu “>

    etc.

    I was wondering about this text:

    Another way to find the random string is to compare the combined CSS or JS files for a page using the same separate-window diff-checker method. This is easiest if you have minification turned off.

    Should I turn off in the Page Optimization page -> CSS Settings -> CSS Minify and in JS Settings -> JS Minify for this?

    Best Regards,

    Tuomo Nurkkala

    Plugin Support qtwrk

    (@qtwrk)

    it’s more like you need to open in 2 same type page , for exxample

    /product1?LSCWP_CTRL=before_optm

    /product2?LSCWP_CTRL=before_optm

    or

    /category1?LSCWP_CTRL=before_optm

    /category2?LSCWP_CTRL=before_optm

    to compare the difference

    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    Hi @qtwrk

    I am not finding too much of differences there.

    I found these minor changes in:

    https://www.sukat.com/?LSCWP_CTRL=before_optm
    https://www.sukat.com/?LSCWP_CTRL=before_optm

    Row 2910: #widget-926 {
    Row 2910: #widget-176 {

    Row 2914: #widget-926 .widget-title {
    Row 2914: #widget-176 .widget-title {

    Row 3019: <div id=”widget-324″ class=”widget_nav_mega_menu shortcode-mega-menu “>
    Row 3019: <div id=”widget-112″ class=”widget_nav_mega_menu shortcode-mega-menu “>

    etc.

    I found similar small changes in products and categories.

    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    I have mobile pages and computer pages as well.

    In the themes Custom CSS I have these for Custom CSS for desktop:

    body .headertekstimobiili{
    display:none;
    }

    body .vc_row.headertekstimobiili{
    display:none;
    }

    and for Custom CSS for mobile landscape & Custom CSS for mobile:

    body .headerteksti{
    display:none;
    }

    body .vc_row.headerteksti {
    display: none;
    }

    But I don’t know do these have anything to do with this growing JS files in cPanel..

    Best Regards,

    Tuomo Nurkkala

    Plugin Support qtwrk

    (@qtwrk)

    these are CSS, not JS

    another simple way is go to /wp-content/litespeed/js/ , download 2 similar size of JS’ files and compare them directly

    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    I think I found the main reason for the problem.

    Before I had this JS Combine External and Inline -> ON and this was making maybe 100 files or more to /wp-content/litespeed/js/ .

    Now that I turned this OFF there is only 6 files for each site.

    Now the cPanel is not growing as large anymore.

    Okay, I will look on those files.

    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    Okay, I found some differences from comparing two different files, but I really dont understand anything of these. One file is missing all of these codes:

    !function(n,r){var t,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,t=n._,(e=n._=r()).noConflict=function(){return n._=t,e})}(this,function(){var n="1.13.6",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,F=Object.prototype,V="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=F.toString,q=F.hasOwnProperty,t="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=t&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,o){return o=null==o?u.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),r=Array(n),t=0;t<n;t++)r[t]=arguments[t+o];switch(o){case 0:return u.call(this,r);case 1:return u.call(this,arguments[0],r);case 2:return u.call(this,arguments[0],arguments[1],r)}for(var e=Array(o+1),t=0;t<o;t++)e[t]=arguments[t];return e[o]=r,u.apply(this,e)}}function o(n){var r=typeof n;return"function"==r||"object"==r&&!!n}function H(n){return void 0===n}function Q(n){return!0===n||!1===n||"[object Boolean]"===s.call(n)}function i(n){var r="[object "+n+"]";return function(n){return s.call(n)===r}}var X=i("String"),Y=i("Number"),Z=i("Date"),nn=i("RegExp"),rn=i("Error"),tn=i("Symbol"),en=i("ArrayBuffer"),a=i("Function"),r=r.document&&r.document.childNodes,p=a="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof r?function(n){return"function"==typeof n||!1}:a,r=i("Object"),un=u&&r(new DataView(new ArrayBuffer(8))),a="undefined"!=typeof Map&&r(new Map),u=i("DataView");var h=un?function(n){return null!=n&&p(n.getInt8)&&en(n.buffer)}:u,v=U||i("Array");function y(n,r){return null!=n&&q.call(n,r)}var on=i("Arguments"),an=(!function(){on(arguments)||(on=function(n){return y(n,"callee")})}(),on);function fn(n){return Y(n)&&$(n)}function cn(n){return function(){return n}}function ln(r){return function(n){n=r(n);return"number"==typeof n&&0<=n&&n<=G}}function sn(r){return function(n){return null==n?void 0:n[r]}}var d=sn("byteLength"),pn=ln(d),hn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var vn=t?function(n){return L?L(n)&&!h(n):pn(n)&&hn.test(s.call(n))}:cn(!1),g=sn("length");function yn(n,r){r=function(r){for(var t={},n=r.length,e=0;e<n;++e)t[r[e]]=!0;return{contains:function(n){return!0===t[n]},push:function(n){return t[n]=!0,r.push(n)}}}(r);var t=J.length,e=n.constructor,u=p(e)&&e.prototype||F,o="constructor";for(y(n,o)&&!r.contains(o)&&r.push(o);t--;)(o=J[t])in n&&n[o]!==u[o]&&!r.contains(o)&&r.push(o)}function b(n){if(!o(n))return[];if(W)return W(n);var r,t=[];for(r in n)y(n,r)&&t.push(r);return K&&yn(n,t),t}function dn(n,r){var t=b(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function m(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)}function gn(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,d(n))}m.VERSION=n,m.prototype.valueOf=m.prototype.toJSON=m.prototype.value=function(){return this._wrapped},m.prototype.toString=function(){return String(this._wrapped)};var bn="[object DataView]";function mn(n,r,t,e){var u;return n===r?0!==n||1/n==1/r:null!=n&&null!=r&&(n!=n?r!=r:("function"==(u=typeof n)||"object"==u||"object"==typeof r)&&function n(r,t,e,u){r instanceof m&&(r=r._wrapped);t instanceof m&&(t=t._wrapped);var o=s.call(r);if(o!==s.call(t))return!1;if(un&&"[object Object]"==o&&h(r)){if(!h(t))return!1;o=bn}switch(o){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return V.valueOf.call(r)===V.valueOf.call(t);case"[object ArrayBuffer]":case bn:return n(gn(r),gn(t),e,u)}o="[object Array]"===o;if(!o&&vn(r)){var i=d(r);if(i!==d(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof r||"object"!=typeof t)return!1;var i=r.constructor,a=t.constructor;if(i!==a&&!(p(i)&&i instanceof i&&p(a)&&a instanceof a)&&"constructor"in r&&"constructor"in t)return!1}e=e||[];u=u||[];var f=e.length;for(;f--;)if(e[f]===r)return u[f]===t;e.push(r);u.push(t);if(o){if((f=r.length)!==t.length)return!1;for(;f--;)if(!mn(r[f],t[f],e,u))return!1}else{var c,l=b(r);if(f=l.length,b(t).length!==f)return!1;for(;f--;)if(c=l[f],!y(t,c)||!mn(r[c],t[c],e,u))return!1}e.pop();u.pop();return!0}(n,r,t,e))}function c(n){if(!o(n))return[];var r,t=[];for(r in n)t.push(r);return K&&yn(n,t),t}function jn(e){var u=g(e);return function(n){if(null==n)return!1;var r=c(n);if(g(r))return!1;for(var t=0;t<u;t++)if(!p(n[e[t]]))return!1;return e!==wn||!p(n[_n])}}var _n="forEach",r=["clear","delete"],u=["get","has","set"],U=r.concat(_n,u),wn=r.concat(u),t=["add"].concat(r,_n,"has"),u=a?jn(U):i("Map"),r=a?jn(wn):i("WeakMap"),U=a?jn(t):i("Set"),a=i("WeakSet");function j(n){for(var r=b(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function An(n){for(var r={},t=b(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function xn(n){var r,t=[];for(r in n)p(n[r])&&t.push(r);return t.sort()}function Sn(f,c){return function(n){var r=arguments.length;if(c&&(n=Object(n)),!(r<2||null==n))for(var t=1;t<r;t++)for(var e=arguments[t],u=f(e),o=u.length,i=0;i<o;i++){var a=u[i];c&&void 0!==n[a]||(n[a]=e[a])}return n}}var On=Sn(c),_=Sn(b),Mn=Sn(c,!0);function En(n){var r;return o(n)?z?z(n):((r=function(){}).prototype=n,n=new r,r.prototype=null,n):{}}function Bn(n){return v(n)?n:[n]}function w(n){return m.toPath(n)}function Nn(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function In(n,r,t){n=Nn(n,w(r));return H(n)?t:n}function Tn(n){return n}function A(r){return r=_({},r),function(n){return dn(n,r)}}function kn(r){return r=w(r),function(n){return Nn(n,r)}}function x(u,o,n){if(void 0===o)return u;switch(null==n?3:n){case 1:return function(n){return u.call(o,n)};case 3:return function(n,r,t){return u.call(o,n,r,t)};case 4:return function(n,r,t,e){return u.call(o,n,r,t,e)}}return function(){return u.apply(o,arguments)}}function Dn(n,r,t){return null==n?Tn:p(n)?x(n,r,t):(o(n)&&!v(n)?A:kn)(n)}function Rn(n,r){return Dn(n,r,1/0)}function S(n,r,t){return m.iteratee!==Rn?m.iteratee(n,r):Dn(n,r,t)}function Fn(){}function Vn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}m.toPath=Bn,m.iteratee=Rn;var O=Date.now||function(){return(new Date).getTime()};function Pn(r){function t(n){return r[n]}var n="(?:"+b(r).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,t):n}}var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"'","":""},qn=Pn(t),t=Pn(An(t)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,r,t,e,u){return e instanceof r?(e=En(n.prototype),o(r=n.apply(e,u))?r:e):n.apply(t,u)}var M=l(function(u,o){function i(){for(var n=0,r=o.length,t=Array(r),e=0;e<r;e++)t[e]=o[e]===a?arguments[n++]:o[e];for(;n<arguments.length;)t.push(arguments[n++]);return Jn(u,i,this,this,t)}var a=M.placeholder;return i}),Gn=(M.placeholder=m,l(function(r,t,e){var u;if(p(r))return u=l(function(n){return Jn(r,u,t,this,e.concat(n))});throw new TypeError("Bind must be called on a function")})),E=ln(g);function B(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=g(n);o<i;o++){var a=n[o];if(E(a)&&(v(a)||an(a)))if(1<r)B(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var Hn=l(function(n,r){var t=(r=B(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=Gn(n[e],n)}return n});var Qn=l(function(n,r,t){return setTimeout(function(){return n.apply(null,t)},r)}),Xn=M(Qn,m,1);function Yn(n){return function(){return!n.apply(this,arguments)}}function Zn(n,r){var t;return function(){return 0<--n&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var nr=M(Zn,2);function rr(n,r,t){r=S(r,t);for(var e,u=b(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function tr(o){return function(n,r,t){r=S(r,t);for(var e=g(n),u=0<o?0:e-1;0<=u&&u<e;u+=o)if(r(n[u],u,n))return u;return-1}}var er=tr(1),ur=tr(-1);function or(n,r,t,e){for(var u=(t=S(t,e,1))(r),o=0,i=g(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function ir(o,i,a){return function(n,r,t){var e=0,u=g(n);if("number"==typeof t)0<o?e=0<=t?t:Math.max(t+u,e):u=0<=t?Math.min(t+1,u):t+u+1;else if(a&&t&&u)return n[t=a(n,r)]===r?t:-1;if(r!=r)return 0<=(t=i(f.call(n,e,u),fn))?t+e:-1;for(t=0<o?e:u-1;0<=t&&t<u;t+=o)if(n[t]===r)return t;return-1}}var ar=ir(1,er,or),fr=ir(-1,ur);function cr(n,r,t){r=(E(n)?er:rr)(n,r,t);if(void 0!==r&&-1!==r)return n[r]}function N(n,r,t){if(r=x(r,t),E(n))for(u=0,o=n.length;u<o;u++)r(n[u],u,n);else for(var e=b(n),u=0,o=e.length;u<o;u++)r(n[e[u]],e[u],n);return n}function I(n,r,t){r=S(r,t);for(var e=!E(n)&&b(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function lr(p){return function(n,r,t,e){var u=3<=arguments.length,o=n,i=x(r,e,4),a=t,f=!E(o)&&b(o),c=(f||o).length,l=0<p?0:c-1;for(u||(a=o[f?f[l]:l],l+=p);0<=l&&l<c;l+=p){var s=f?f[l]:l;a=i(a,o[s],s,o)}return a}}var sr=lr(1),pr=lr(-1);function T(n,e,r){var u=[];return e=S(e,r),N(n,function(n,r,t){e(n,r,t)&&u.push(n)}),u}function hr(n,r,t){r=S(r,t);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!r(n[i],i,n))return!1}return!0}function vr(n,r,t){r=S(r,t);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function k(n,r,t,e){return E(n)||(n=j(n)),0<=ar(n,r,t="number"==typeof t&&!e?t:0)}var yr=l(function(n,t,e){var u,o;return p(t)?o=t:(t=w(t),u=t.slice(0,-1),t=t[t.length-1]),I(n,function(n){var r=o;if(!r){if(null==(n=u&&u.length?Nn(n,u):n))return;r=n[t]}return null==r?r:r.apply(n,e)})});function dr(n,r){return I(n,kn(r))}function gr(n,e,r){var t,u,o=-1/0,i=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(t=n[a])&&o<t&&(o=t);else e=S(e,r),N(n,function(n,r,t){u=e(n,r,t),(i<u||u===-1/0&&o===-1/0)&&(o=n,i=u)});return o}var br=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function mr(n){return n?v(n)?f.call(n):X(n)?n.match(br):E(n)?I(n,Tn):j(n):[]}function jr(n,r,t){if(null==r||t)return(n=E(n)?n:j(n))[Vn(n.length-1)];for(var e=mr(n),t=g(e),u=(r=Math.max(Math.min(r,t),0),t-1),o=0;o<r;o++){var i=Vn(o,u),a=e[o];e[o]=e[i],e[i]=a}return e.slice(0,r)}function D(o,r){return function(t,e,n){var u=r?[[],[]]:{};return e=S(e,n),N(t,function(n,r){r=e(n,r,t);o(u,n,r)}),u}}var _r=D(function(n,r,t){y(n,t)?n[t].push(r):n[t]=[r]}),wr=D(function(n,r,t){n[t]=r}),Ar=D(function(n,r,t){y(n,t)?n[t]++:n[t]=1}),xr=D(function(n,r,t){n[t?0:1].push(r)},!0);function Sr(n,r,t){return r in t}var Or=l(function(n,r){var t={},e=r[0];if(null!=n){p(e)?(1<r.length&&(e=x(e,r[1])),r=c(n)):(e=Sr,r=B(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}}return t}),Mr=l(function(n,t){var r,e=t[0];return p(e)?(e=Yn(e),1<t.length&&(r=t[1])):(t=I(B(t,!1,!1),String),e=function(n,r){return!k(t,r)}),Or(n,e,r)});function Er(n,r,t){return f.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Br(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Er(n,n.length-r)}function R(n,r,t){return f.call(n,null==r||t?1:r)}var Nr=l(function(n,r){return r=B(r,!0,!0),T(n,function(n){return!k(r,n)})}),Ir=l(function(n,r){return Nr(n,r)});function Tr(n,r,t,e){Q(r)||(e=t,t=r,r=!1),null!=t&&(t=S(t,e));for(var u=[],o=[],i=0,a=g(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?k(o,c)||(o.push(c),u.push(f)):k(u,f)||u.push(f)}return u}var kr=l(function(n){return Tr(B(n,!0,!0))});function Dr(n){for(var r=n&&gr(n,g).length||0,t=Array(r),e=0;e<r;e++)t[e]=dr(n,e);return t}var Rr=l(Dr);function Fr(n,r){return n._chain?m(r).chain():r}function Vr(t){return N(xn(t),function(n){var r=m[n]=t[n];m.prototype[n]=function(){var n=[this._wrapped];return P.apply(n,arguments),Fr(this,r.apply(m,n))}}),m}N(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];m.prototype[r]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0]),Fr(this,n)}}),N(["concat","join","slice"],function(n){var r=e[n];m.prototype[n]=function(){var n=this._wrapped;return Fr(this,n=null!=n?r.apply(n,arguments):n)}});n=Vr({__proto__:null,VERSION:n,restArguments:l,isObject:o,isNull:function(n){return null===n},isUndefined:H,isBoolean:Q,isElement:function(n){return!(!n||1!==n.nodeType)},isString:X,isNumber:Y,isDate:Z,isRegExp:nn,isError:rn,isSymbol:tn,isArrayBuffer:en,isDataView:h,isArray:v,isFunction:p,isArguments:an,isFinite:function(n){return!tn(n)&&C(n)&&!isNaN(parseFloat(n))},isNaN:fn,isTypedArray:vn,isEmpty:function(n){var r;return null==n||("number"==typeof(r=g(n))&&(v(n)||X(n)||an(n))?0===r:0===g(b(n)))},isMatch:dn,isEqual:function(n,r){return mn(n,r)},isMap:u,isWeakMap:r,isSet:U,isWeakSet:a,keys:b,allKeys:c,values:j,pairs:function(n){for(var r=b(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:An,functions:xn,methods:xn,extend:On,extendOwn:_,assign:_,defaults:Mn,create:function(n,r){return n=En(n),r&&_(n,r),n},clone:function(n){return o(n)?v(n)?n.slice():On({},n):n},tap:function(n,r){return r(n),n},get:In,has:function(n,r){for(var t=(r=w(r)).length,e=0;e<t;e++){var u=r[e];if(!y(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=S(r,t);for(var e=b(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:Tn,constant:cn,noop:Fn,toPath:Bn,property:kn,propertyOf:function(r){return null==r?Fn:function(n){return In(r,n)}},matcher:A,matches:A,times:function(n,r,t){var e=Array(Math.max(0,n));r=x(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Vn,now:O,escape:qn,unescape:t,templateSettings:Un,template:function(o,n,r){n=Mn({},n=!n&&r?r:n,m.templateSettings);var t,r=RegExp([(n.escape||Wn).source,(n.interpolate||Wn).source,(n.evaluate||Wn).source].join("|")+"|$","g"),i=0,a="__p+='";if(o.replace(r,function(n,r,t,e,u){return a+=o.slice(i,u).replace(Ln,$n),i=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",r=n.variable){if(!Cn.test(r))throw new Error("variable is not a bare identifier: "+r)}else a="with(obj||{}){\n"+a+"}\n",r="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(r,"_",a)}catch(n){throw n.source=a,n}function e(n){return t.call(this,n,m)}return e.source="function("+r+"){\n"+a+"}",e},result:function(n,r,t){var e=(r=w(r)).length;if(!e)return p(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=p(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Kn+"";return n?n+r:r},chain:function(n){return(n=m(n))._chain=!0,n},iteratee:Rn,partial:M,bind:Gn,bindAll:Hn,memoize:function(e,u){function o(n){var r=o.cache,t=""+(u?u.apply(this,arguments):n);return y(r,t)||(r[t]=e.apply(this,arguments)),r[t]}return o.cache={},o},delay:Qn,defer:Xn,throttle:function(t,e,u){function o(){l=!1===u.leading?0:O(),i=null,c=t.apply(a,f),i||(a=f=null)}function n(){var n=O(),r=(l||!1!==u.leading||(l=n),e-(n-l));return a=this,f=arguments,r<=0||e<r?(i&&(clearTimeout(i),i=null),l=n,c=t.apply(a,f),i||(a=f=null)):i||!1===u.trailing||(i=setTimeout(o,r)),c}var i,a,f,c,l=0;return u=u||{},n.cancel=function(){clearTimeout(i),l=0,i=a=f=null},n},debounce:function(r,t,e){function u(){var n=O()-i;n<t?o=setTimeout(u,t-n):(o=null,e||(f=r.apply(c,a)),o||(a=c=null))}var o,i,a,f,c,n=l(function(n){return c=this,a=n,i=O(),o||(o=setTimeout(u,t),e&&(f=r.apply(c,a))),f});return n.cancel=function(){clearTimeout(o),o=a=c=null},n},wrap:function(n,r){return M(r,n)},negate:Yn,compose:function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:Zn,once:nr,findKey:rr,findIndex:er,findLastIndex:ur,sortedIndex:or,indexOf:ar,lastIndexOf:fr,find:cr,detect:cr,findWhere:function(n,r){return cr(n,A(r))},each:N,forEach:N,map:I,collect:I,reduce:sr,foldl:sr,inject:sr,reduceRight:pr,foldr:pr,filter:T,select:T,reject:function(n,r,t){return T(n,Yn(S(r)),t)},every:hr,all:hr,some:vr,any:vr,contains:k,includes:k,include:k,invoke:yr,pluck:dr,where:function(n,r){return T(n,A(r))},max:gr,min:function(n,e,r){var t,u,o=1/0,i=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(t=n[a])&&t<o&&(o=t);else e=S(e,r),N(n,function(n,r,t){((u=e(n,r,t))<i||u===1/0&&o===1/0)&&(o=n,i=u)});return o},shuffle:function(n){return jr(n,1/0)},sample:jr,sortBy:function(n,e,r){var u=0;return e=S(e,r),dr(I(n,function(n,r,t){return{value:n,index:u++,criteria:e(n,r,t)}}).sort(function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(e<t||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index}),"value")},groupBy:_r,indexBy:wr,countBy:Ar,partition:xr,toArray:mr,size:function(n){return null==n?0:(E(n)?n:b(n)).length},pick:Or,omit:Mr,first:Br,head:Br,take:Br,initial:Er,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:R(n,Math.max(0,n.length-r))},rest:R,tail:R,drop:R,compact:function(n){return T(n,Boolean)},flatten:function(n,r){return B(n,r,!1)},without:Ir,uniq:Tr,unique:Tr,union:kr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=g(n);e<u;e++){var o=n[e];if(!k(r,o)){for(var i=1;i<t&&k(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Nr,unzip:Dr,transpose:Dr,zip:Rr,object:function(n,r){for(var t={},e=0,u=g(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t=t||(r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(f.call(n,e,e+=r));return t},mixin:Vr,default:m});return n._=n});
    
    ;window.wp=window.wp||{};(function($){var settings=typeof _wpUtilSettings==='undefined'?{}:_wpUtilSettings;wp.template=_.memoize(function(id){var compiled,options={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:'data'};return function(data){if(!document.getElementById('tmpl-'+id)){throw new Error('Template not found: '+'#tmpl-'+id)}
    
    compiled=compiled||_.template($('#tmpl-'+id).html(),options);return compiled(data)}});wp.ajax={settings:settings.ajax||{},post:function(action,data){return wp.ajax.send({data:_.isObject(action)?action:_.extend(data||{},{action:action})})},send:function(action,options){var promise,deferred;if(_.isObject(action)){options=action}else{options=options||{};options.data=_.extend(options.data||{},{action:action})}
    
    options=_.defaults(options||{},{type:'POST',url:wp.ajax.settings.url,context:this});deferred=$.Deferred(function(deferred){if(options.success){deferred.done(options.success)}
    
    if(options.error){deferred.fail(options.error)}
    
    delete options.success;delete options.error;deferred.jqXHR=$.ajax(options).done(function(response){if(response==='1'||response===1){response={success:!0}}
    
    if(_.isObject(response)&&!_.isUndefined(response.success)){var context=this;deferred.done(function(){if(action&&action.data&&'query-attachments'===action.data.action&&deferred.jqXHR.hasOwnProperty('getResponseHeader')&&deferred.jqXHR.getResponseHeader('X-WP-Total')){context.totalAttachments=parseInt(deferred.jqXHR.getResponseHeader('X-WP-Total'),10)}else{context.totalAttachments=0}});deferred[response.success?'resolveWith':'rejectWith'](this,[response.data])}else{deferred.rejectWith(this,[response])}}).fail(function(){deferred.rejectWith(this,arguments)})});promise=deferred.promise();promise.abort=function(){deferred.jqXHR.abort();return this};return promise}}}(jQuery))
    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    Here is one other which the other file was missing as well:

    
    return matching};VariationForm.prototype.isMatch=function(variation_attributes,attributes){var match=!0;for(var attr_name in variation_attributes){if(variation_attributes.hasOwnProperty(attr_name)){var val1=variation_attributes[attr_name];var val2=attributes[attr_name];if(val1!==undefined&&val2!==undefined&&val1.length!==0&&val2.length!==0&&val1!==val2){match=!1}}}
    return match};VariationForm.prototype.toggleResetLink=function(on){if(on){if(this.$resetVariations.css('visibility')==='hidden'){this.$resetVariations.css('visibility','visible').hide().fadeIn()}}else{this.$resetVariations.css('visibility','hidden')}};$.fn.wc_variation_form=function(){new VariationForm(this);return this};$.fn.wc_set_content=function(content){if(undefined===this.attr('data-o_content')){this.attr('data-o_content',this.text())}
    this.text(content)};$.fn.wc_reset_content=function(){if(undefined!==this.attr('data-o_content')){this.text(this.attr('data-o_content'))}};$.fn.wc_set_variation_attr=function(attr,value){if(undefined===this.attr('data-o_'+attr)){this.attr('data-o_'+attr,(!this.attr(attr))?'':this.attr(attr))}
    if(!1===value){this.removeAttr(attr)}else{this.attr(attr,value)}};$.fn.wc_reset_variation_attr=function(attr){if(undefined!==this.attr('data-o_'+attr)){this.attr(attr,this.attr('data-o_'+attr))}};$.fn.wc_maybe_trigger_slide_position_reset=function(variation){var $form=$(this),$product=$form.closest('.product'),$product_gallery=$product.find('.images'),reset_slide_position=!1,new_image_id=(variation&&variation.image_id)?variation.image_id:'';if($form.attr('current-image')!==new_image_id){reset_slide_position=!0}
    $form.attr('current-image',new_image_id);if(reset_slide_position){$product_gallery.trigger('woocommerce_gallery_reset_slide_position')}};$.fn.wc_variations_image_update=function(variation){var $form=this,$product=$form.closest('.product'),$product_gallery=$product.find('.images'),$gallery_nav=$product.find('.flex-control-nav'),$gallery_img=$gallery_nav.find('li:eq(0) img'),$product_img_wrap=$product_gallery.find('.woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder').eq(0),$product_img=$product_img_wrap.find('.wp-post-image'),$product_link=$product_img_wrap.find('a').eq(0);if(variation&&variation.image&&variation.image.src&&variation.image.src.length>1){var galleryHasImage=$gallery_nav.find('li img[data-o_src="'+variation.image.gallery_thumbnail_src+'"]').length>0;if(galleryHasImage){$form.wc_variations_image_reset()}
    var slideToImage=$gallery_nav.find('li img[src="'+variation.image.gallery_thumbnail_src+'"]');if(slideToImage.length>0){slideToImage.trigger('click');$form.attr('current-image',variation.image_id);window.setTimeout(function(){$(window).trigger('resize');$product_gallery.trigger('woocommerce_gallery_init_zoom')},20);return}
    $product_img.wc_set_variation_attr('src',variation.image.src);$product_img.wc_set_variation_attr('height',variation.image.src_h);$product_img.wc_set_variation_attr('width',variation.image.src_w);$product_img.wc_set_variation_attr('srcset',variation.image.srcset);$product_img.wc_set_variation_attr('sizes',variation.image.sizes);$product_img.wc_set_variation_attr('title',variation.image.title);$product_img.wc_set_variation_attr('data-caption',variation.image.caption);$product_img.wc_set_variation_attr('alt',variation.image.alt);$product_img.wc_set_variation_attr('data-src',variation.image.full_src);$product_img.wc_set_variation_attr('data-large_image',variation.image.full_src);$product_img.wc_set_variation_attr('data-large_image_width',variation.image.full_src_w);$product_img.wc_set_variation_attr('data-large_image_height',variation.image.full_src_h);$product_img_wrap.wc_set_variation_attr('data-thumb',variation.image.src);$gallery_img.wc_set_variation_attr('src',variation.image.gallery_thumbnail_src);$product_link.wc_set_variation_attr('href',variation.image.full_src)}else{$form.wc_variations_image_reset()}
    window.setTimeout(function(){$(window).trigger('resize');$form.wc_maybe_trigger_slide_position_reset(variation);$product_gallery.trigger('woocommerce_gallery_init_zoom')},20)};$.fn.wc_variations_image_reset=function(){var $form=this,$product=$form.closest('.product'),$product_gallery=$product.find('.images'),$gallery_nav=$product.find('.flex-control-nav'),$gallery_img=$gallery_nav.find('li:eq(0) img'),$product_img_wrap=$product_gallery.find('.woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder').eq(0),$product_img=$product_img_wrap.find('.wp-post-image'),$product_link=$product_img_wrap.find('a').eq(0);$product_img.wc_reset_variation_attr('src');$product_img.wc_reset_variation_attr('width');$product_img.wc_reset_variation_attr('height');$product_img.wc_reset_variation_attr('srcset');$product_img.wc_reset_variation_attr('sizes');$product_img.wc_reset_variation_attr('title');$product_img.wc_reset_variation_attr('data-caption');$product_img.wc_reset_variation_attr('alt');$product_img.wc_reset_variation_attr('data-src');$product_img.wc_reset_variation_attr('data-large_image');$product_img.wc_reset_variation_attr('data-large_image_width');$product_img.wc_reset_variation_attr('data-large_image_height');$product_img_wrap.wc_reset_variation_attr('data-thumb');$gallery_img.wc_reset_variation_attr('src');$product_link.wc_reset_variation_attr('href')};$(function(){if(typeof wc_add_to_cart_variation_params!=='undefined'){$('.variations_form').each(function(){$(this).wc_variation_form()})}});var wc_variation_form_matcher={find_matching_variations:function(product_variations,settings){var matching=[];for(var i=0;i<product_variations.length;i++){var variation=product_variations[i];if(wc_variation_form_matcher.variations_match(variation.attributes,settings)){matching.push(variation)}}
    return matching},variations_match:function(attrs1,attrs2){var match=!0;for(var attr_name in attrs1){if(attrs1.hasOwnProperty(attr_name)){var val1=attrs1[attr_name];var val2=attrs2[attr_name];if(val1!==undefined&&val2!==undefined&&val1.length!==0&&val2.length!==0&&val1!==val2){match=!1}}}
    return match}};var wp_template=function(templateId){var html=document.getElementById('tmpl-'+templateId).textContent;var hard=!1;hard=hard||/<#\s?data\./.test(html);hard=hard||/?\s?data\.(?!variation\.).+?/.test(html);hard=hard||/{{{?\s?data\.variation\.[\w-]*[^\s}]/.test(html);if(hard){return wp.template(templateId)}
    return function template(data){var variation=data.variation||{};return html.replace(/(?)\s?data\.variation\.([\w-]*)\s?(?)/g,function(_,open,key,close){if(open.length!==close.length){return''}
    var replacement=variation[key]||'';if(open.length===2){return window.escape(replacement)}
    return replacement})}}})(jQuery,window,document)
    ;(function($){const removeAttrClass=cfvsw_swatches_settings.remove_attr_class;const addRemoveWithCommonClass=${ removeAttrClass } cfvsw-swatches-out-of-stock;const addRemoveDisableClass=removeAttrClass+'-disable';const addRemoveDisableClassCommon=${ addRemoveDisableClass } cfvsw-swatches-disabled;const SW={init:()=>{if(cfvsw_swatches_settings.disable_out_of_stock){SW.firstTime();SW.Events()}},firstTime:()=>{const getVariationTable=$('table.variations').not('.cfvsw-variation-disable-logic');getVariationTable.addClass('cfvsw-variation-disable-logic');getVariationTable.each(function(){const table=$(this);const getForm=table.closest('[data-product_id][data-product_variations]');const getFormData=getForm.data('product_variations');SW.swatchesOptions(getForm,getFormData)})},chooseOption(){const option=$(this);const getForm=option.closest('[data-product_id][data-product_variations]');getForm.find('.disable-to-select').removeClass('disable-to-select');const td=option.closest('td');const checkTdSelected=td.find('.cfvsw-hidden-select select').val();if(''!==checkTdSelected){td.addClass('disable-to-select')}
    const getFormData=getForm.data('product_variations');SW.swatchesOptions(getForm,getFormData)},getSelectedOptions:(getForm)=>{const getSelectedSwatches=getForm.find('.cfvsw-hidden-select select');const selected={};getSelectedSwatches.each(function(){const select=$(this);const getValue=select.val();const getAttrName=select.attr('data-attribute_name');if(''!==getValue&&''!==getAttrName){selected[getAttrName]=getValue}});return selected},swatchesOptions:(getForm,getFormData)=>{const getTdAvoidCurrent=getForm.find('td').not('.disable-to-select');const getAllSelect=getTdAvoidCurrent.find('.cfvsw-swatches-container[swatches-attr]');if(!getAllSelect.length){return}
    const getSelectedOptions=SW.getSelectedOptions(getForm);const findToRemoveClass=getTdAvoidCurrent.find(.${ addRemoveDisableClass });if(findToRemoveClass.length){findToRemoveClass.removeClass(addRemoveDisableClassCommon)}
    getAllSelect.each(function(){const select=$(this);const getAttrName=select.attr('swatches-attr');if(''!==getAttrName){const findOptions=select.find('.cfvsw-swatches-option');findOptions.each(function(){const optValue=$(this);const currentTermSlug=optValue.attr('data-slug');if(currentTermSlug&&''!==currentTermSlug){const hasStock=SW.checkOptionAvail(getAttrName,currentTermSlug,getSelectedOptions,getFormData);if(!hasStock){optValue.addClass(addRemoveDisableClassCommon)}}})}})},checkOptionAvail:(getAttrName,currentTermSlug,getSelectedOptions,getFormData)=>{let hasThisSwatch;for(let index=0;index<getFormData.length;index++){const productVariations=getFormData[index];const{attributes,is_in_stock}=productVariations;const passedInRaw=SW.checkInPreRawData(getSelectedOptions,attributes,getAttrName,currentTermSlug,is_in_stock);if(passedInRaw){hasThisSwatch=is_in_stock;break}}
    return hasThisSwatch},checkInPreRawData:(getSelectedOptions,attributes,getAttrName,currentTermSlug,is_in_stock)=>{let hasThisSwatch=!1;const copySelected={...getSelectedOptions};const selectedKeys=Object.keys(getSelectedOptions);const getCurrentIndex=selectedKeys.indexOf(getAttrName);const currentObj={};currentObj[getAttrName]=currentTermSlug;if(getCurrentIndex>=0){selectedKeys.splice(getCurrentIndex,1);delete copySelected[getAttrName]}
    hasThisSwatch=SW.checkInRawData(attributes,copySelected,currentObj,is_in_stock);return hasThisSwatch},checkInRawData:(attribute,selected,currentObj,is_in_stock)=>{const cloneAttr={...attribute};const selectedCurrent={...selected,...currentObj};let checkAndAvail=!0;for(const checkIsAvail in selectedCurrent){const value=selectedCurrent[checkIsAvail];const attrValue=attribute[checkIsAvail];if(''===attrValue){delete cloneAttr[checkIsAvail];continue}
    if(value===attrValue){delete cloneAttr[checkIsAvail];continue}
    checkAndAvail=!1}
    if(is_in_stock){return checkAndAvail}
    for(const cloneKey in cloneAttr){const cloneValue=cloneAttr[cloneKey];if(''!==cloneValue){checkAndAvail=!1}}
    return checkAndAvail},Events:()=>{$(document).on('click','.cfvsw-swatches-container .cfvsw-swatches-option[data-slug]',SW.chooseOption)},};$(document).on('click','.cfvsw-swatches-option',function(){const swatchesOption=$(this);if(swatchesOption.hasClass('cfvsw-swatches-disabled')||swatchesOption.hasClass('cfvsw-swatches-out-of-stock')){return}
    onClickSwatchesOption(swatchesOption)});$('body').on('click','.cfvsw_ajax_add_to_cart.cfvsw_variation_found',function(e){e.preventDefault();triggerAddToCart($(this))});function onClickSwatchesOption(swatch){if(swatch.hasClass('cfvsw-selected-swatch')){swatch.removeClass('cfvsw-selected-swatch');resetPrice(swatch);resetThumbnail(swatch);resetButtonData(swatch)}else{const parent=swatch.parent();parent.find('.cfvsw-swatches-option').each(function(){$(this).removeClass('cfvsw-selected-swatch')});swatch.addClass('cfvsw-selected-swatch')}
    updateSelectOption(swatch);if(cfvsw_swatches_settings.html_design!=='inline'){updateTitle(swatch)}}
    function updateSelectOption(swatch){const value=swatch.hasClass('cfvsw-selected-swatch')?swatch.data('slug'):'';const select=swatch.closest('.cfvsw-swatches-container').prev().find('select');select.val(value).change()}
    function updateTitle(swatch){const label=swatch.closest('tr').children('.label');label.find('.cfvsw-selected-label').remove();if(!swatch.hasClass('cfvsw-selected-swatch')){return}
    label.children('label').append('<span class="cfvsw-selected-label"></span>');label.children('label').children('.cfvsw-selected-label').html(swatch.data('title'))}
    function triggerAddToCart(variant){if(variant.is('.wc-variation-is-unavailable')){return window.alert(cfvsw_swatches_settings.unavailable_text)}
    const productId=variant.data('product_id');let variationId=variant.attr('data-variation_id');variationId=parseInt(variationId);if(isNaN(productId)||productId===0||isNaN(variationId)||variationId===0){return!0}
    let variation=variant.attr('data-selected_variant');variation=JSON.parse(variation);const data={action:'cfvsw_ajax_add_to_cart',security:cfvsw_swatches_settings.ajax_add_to_cart_nonce,product_id:productId,variation_id:variationId,variation,};$(document.body).trigger('adding_to_cart',[variant,data]);variant.removeClass('added').addClass('loading');$.ajax({type:'POST',url:cfvsw_swatches_settings.ajax_url,data,dataType:'json',success(response){if(!response){return}
    if(response.error&&response.product_url){window.location=response.product_url;return}
    $(document.body).trigger('added_to_cart',[response.fragments,response.cart_hash,variant,]);$(document.body).trigger('update_checkout');variant.removeClass('loading').addClass('added')},error(errorThrown){variant.removeClass('loading');console.log(errorThrown)},})}
    $(document).on('change','.cfvsw-hidden-select select',function(){setTimeout(()=>{updateSwatchesAvailability()},1)});$('.reset_variations').on('click',function(){resetSwatches($(this))});$(document).on({mouseenter(){const addToTooltip=$(this);const tooltip=addToTooltip.data('tooltip');if(''===tooltip||'undefined'===typeof tooltip||addToTooltip.hasClass('cfvsw-label-option')){return}
    if(addToTooltip.children('.cfvsw-tooltip').length===0){addToTooltip.prepend(<div class="cfvsw-tooltip"><span class="cfvsw-tooltip-label">${ tooltip }</span></div>);$('.cfvsw-tooltip').fadeIn(500);const swatchHeight=addToTooltip.children('.cfvsw-swatch-inner').innerHeight();$('.cfvsw-tooltip').css({bottom:swatchHeight,});if(cfvsw_swatches_settings.tooltip_image&&addToTooltip.hasClass('cfvsw-image-option')){$('.cfvsw-tooltip').prepend("<span class='cfvsw-tooltip-preview'></span>");const preview=addToTooltip.children('.cfvsw-swatch-inner').css('backgroundImage');$('.cfvsw-tooltip').css({bottom:swatchHeight-30,padding:'2px',});$('.cfvsw-tooltip-preview').css({backgroundImage:preview,backgroundSize:'cover',})}}},mouseleave(){$('.cfvsw-tooltip').remove()},},'.cfvsw-swatches-option');$(document).on('ready',function(){setTimeout(()=>{setSwatchesSelection()},1);$('.woocommerce-widget-layered-nav-list').each(function(){if($(this).find('.cfvsw-swatches-container').length){$(this).addClass('cfvsw-filters')}})});$('.cfvsw-shop-variations').on('click',function(e){e.preventDefault()});$('.cfvsw-shop-variations .cfvsw-more-link').on('click',function(e){window.location=e.target.href});function updateSwatchesAvailability(){$('.cfvsw-hidden-select select').each(function(){const availableOptions=[];$(this).children('option').each(function(){if(''!==$(this).val()){availableOptions.push($(this).val())}});$(this).parent().next().find('.cfvsw-swatches-option').each(function(){if(-1===$.inArray($(this).attr('data-slug'),availableOptions)){$(this).addClass(addRemoveWithCommonClass)}else{$(this).removeClass(addRemoveWithCommonClass)}})})}
    function setSwatchesSelection(){$('.cfvsw-hidden-select select').each(function(){const selected=$(this).val();$(this).parent().next().find([data-slug='${ selected }']).trigger('click')})}
    function resetSwatches(resetButton){$('.cfvsw-swatches-option').each(function(){$(this).removeClass('cfvsw-selected-swatch')});$('.cfvsw-selected-label').remove();if(cfvsw_swatches_settings.disable_out_of_stock){const table=resetButton.closest('table');const findDisabledAttr=table.find(.${ addRemoveDisableClass });const findDisableSelect=table.find('.disable-to-select');if(findDisableSelect.length){findDisableSelect.removeClass('disable-to-select')}
    if(findDisabledAttr){findDisabledAttr.removeClass(addRemoveDisableClassCommon)}
    setTimeout(()=>{SW.firstTime()},20)}}
    function addVariationFunctionality(){$('.cfvsw_variations_form:not(.variation-function-added)').each(function(){const thisForm=$(this);thisForm.addClass('variation-function-added');thisForm.wc_variation_form();thisForm.on('found_variation',function(e,variation){updateThumbnail(thisForm,variation.image);if(thisForm.attr('data-cfvsw-catalog')){return}
    updatePrice(thisForm,variation);updatebuttonData(thisForm,variation)})})}
    $(window).load(function(){addVariationFunctionality()});function updateThumbnail(swatch,imageData){const listItem=swatch.closest('li');const thumbnail=listItem.find('img:first');if(0===listItem.find('.cfvsw-original-thumbnail').length){const originalThumbnail=thumbnail.clone();thumbnail.after('<span class="cfvsw-original-thumbnail"></span>');listItem.find('.cfvsw-original-thumbnail').html(originalThumbnail)}
    thumbnail.attr('src',imageData.thumb_src);thumbnail.attr('srcset','')}
    function resetThumbnail(swatch){const listItem=swatch.closest('li');if(listItem.find('.cfvsw-original-thumbnail').length){const thumbnail=listItem.find('img:first');thumbnail.replaceWith(listItem.find('.cfvsw-original-thumbnail').html());listItem.find('.cfvsw-original-thumbnail').remove()}}
    function updatePrice(swatch,variation){if(0===variation.price_html.length){return}
    if(swatch.parents('li').find('.cfvsw-original-price').length){const price=swatch.parents('li').find('.price');price.replaceWith(variation.price_html)}else{const price=swatch.parents('li').find('.price');price.after(variation.price_html);price.removeClass('price').addClass('cfvsw-original-price')}}
    function resetPrice(swatch){if(swatch.parents('li').find('.cfvsw-original-price').length){swatch.parents('li').find('.price').remove();swatch.parents('li').find('.cfvsw-original-price').removeClass('cfvsw-original-price').addClass('price')}}
    function updatebuttonData(variant,variation){const select=variant.find('.variations select');const data={};const button=variant.parents('li').find('.cfvsw_ajax_add_to_cart');select.each(function(){const attributeName=$(this).data('attribute_name')||$(this).attr('name');const value=$(this).val()||'';data[attributeName]=value});button.html(button.data('add_to_cart_text'));button.addClass('cfvsw_variation_found');button.attr('data-variation_id',variation.variation_id);button.attr('data-selected_variant',JSON.stringify(data))}
    function resetButtonData(variant){const button=variant.parents('li').find('.cfvsw_ajax_add_to_cart');button.html(button.data('select_options_text'));button.removeClass('cfvsw_variation_found');button.attr('data-variation_id','');button.attr('data-selected_variant','')}
    SW.init();document.addEventListener('astraInfinitePaginationLoaded',function(){SW.firstTime();addVariationFunctionality()});document.addEventListener('cfvswVariationLoad',function(){SW.firstTime();addVariationFunctionality()})})(jQuery)
    Plugin Support qtwrk

    (@qtwrk)

    try this:

    open in FTP , find 2 very very very similar size files , download them back , open them in text editor , copy paste both into https://www.diffchecker.com/

    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    Hi @qtwrk

    This are the differences with FTP findings. This is still Off in JS Settings: JS Combine External and Inline

    I found these differences in row 5966:

    ;document.addEventListener('DOMContentLiteSpeedLoaded',function(){document.addEventListener('click',function(e){if(e.target.matches('.wcml_removed_cart_items_clear')){e.preventDefault();wcml_cart_clear_removed_items()}});var

    ;document.addEventListener('DOMContentLoaded',function(){document.addEventListener('click',function(e){if(e.target.matches('.wcml_removed_cart_items_clear')){e.preventDefault();wcml_cart_clear_removed_items()}});var

    I found these differences in row 6070:

    ;document.addEventListener("DOMContentLiteSpeedLoaded",(e=>{var

    ;document.addEventListener("DOMContentLoaded",(e=>{var

    I found these differences in row 6090:

    if(cutsTheMustard){window.addEventListener('DOMContentLiteSpeedLoaded',ready,!1)}

    if(cutsTheMustard){window.addEventListener('DOMContentLoaded',ready,!1)}

    I found these differences in row 6142:

    e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLiteSpeedLoaded",t)},i.toDashed=function(t){return

    e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return

    I found these differences in row 6175:

    document.addEventListener("DOMContentLiteSpeedLoaded",

    document.addEventListener("DOMContentLoaded",

    I found these differences in row 6444:

    document){document.addEventListener('DOMContentLiteSpeedLoaded',function(){FastClick.attach(document.body)},!1)}},woocommerceComments:function(){var

    document){document.addEventListener('DOMContentLoaded',function(){FastClick.attach(document.body)},!1)}},woocommerceComments:function(){var

    Plugin Support qtwrk

    (@qtwrk)

    you can try addEventListener

    but this doesn’t look alright-ish to me , perhaps you can directly share a https://www.diffchecker.com/ link

    Thread Starter tuomonurkkala

    (@tuomonurkkala)

    Hi @qtwrk

    I just tried two similar sized files and they were identical and then I tried two others and there were some differences:

    https://www.diffchecker.com/5Niia3ew/

    I can give you FTP access if you want, but I don’t know how I can send them here privately.

    Best Regards,

    Tuomo Nurkkala

    Plugin Support qtwrk

    (@qtwrk)

    try DOMContent

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Litespeed JS’ is closed to new replies.