Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/modules/wc.min.js
Назад
'use strict';(function(e,b,f){let g=!1,p=!1,r=!1,m=f.querySelector("form.variations_form select"),q=[];const y=themify_vars.wc_js["wc-add-to-cart-variation"],v=themify_vars.wc_js.wc_additional_variation_images_script,t=f.getElementsByClassName("woocommerce-ordering")[0],w=function(){this.closest("form").submit()},n=f.querySelectorAll("input.qty[min]"),z=function(a){if(!p&&themify_vars.photoswipe){p=!0;a.preventDefault();a.stopImmediatePropagation();a=themify_vars.wc_version;const c=this,u=function(a){delete themify_vars.photoswipe[a]; 0===Object.keys(themify_vars.photoswipe).length&&(setTimeout(function(){c.click()},5),delete themify_vars.photoswipe)};b.LoadCss(themify_vars.photoswipe.main,a,null,null,function(){u("main")});b.LoadCss(themify_vars.photoswipe.skin,a,null,null,function(){u("skin")})}},l=function(a,c,u,g){const d=themify_vars.wc_js,h=themify_vars.wc_version,l=a&&!0!==a,k=function(e){delete d[e];0===Object.keys(d).length&&(b.body.off("click.tf_wc_click").off("added_to_cart removed_from_cart",x),t&&t.removeEventListener("change", w,{passive:!0,once:!0}),setTimeout(function(){if(a&&!0!==a&&"load"!==a)if("click"===a.type)for(let a=0,c=q.length;a<c;++a)b.body[0].contains(q[a])&&q[a].click();else b.body.triggerHandler(a.type,[c,u,g]);q=null;b.trigger("tf_wc_js_load")},5))},n=function(){d.woocommerce?b.LoadAsync(d.woocommerce,function(){k("woocommerce")},-1===d.woocommerce.indexOf("ver=",12)?h:!1,null,function(){return void 0!==e.scroll_to_notices}):k("woocommerce")},p=function(){const a=f.getElementsByClassName("variations_form"); if(a[0]||0<f.getElementsByClassName("wcpa_form_outer").length)v&&(e.wc_additional_variation_images_frontend||b.LoadAsync(v,-1===v.indexOf("ver=",12)?h:!1,!1,null,function(){return void 0!==e.wc_additional_variation_images_frontend})),b.LoadAsync(themify_vars.includesURL+"js/underscore.min.js",function(){b.LoadAsync(themify_vars.includesURL+"js/wp-util.min.js",function(){const c=function(){m&&r&&b.triggerEvent(m,"change");m=r=null};if(e.fn.wc_variation_form){for(let c=a.length-1;-1<c;--c)e(a[c]).wc_variation_form(); c()}else b.LoadAsync(y,c,h,null,function(){return"undefined"!==typeof e.fn.wc_variation_form})},themify_vars.wp,null,function(){return void 0!==window.wp&&void 0!==window.wp.template})},themify_vars.wp,null,function(){return"undefined"!==typeof window._})};!0===l&&(d["jquery-blockui"]&&(void 0===e.blockUI?b.LoadAsync(d["jquery-blockui"],function(){k("jquery-blockui")},-1===d["jquery-blockui"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==e.blockUI}):k("jquery-blockui")),d["wc-add-to-cart"]? b.LoadAsync(d["wc-add-to-cart"],function(){k("wc-add-to-cart");p()},-1===d["wc-add-to-cart"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==themify_vars.wc_js_normal}):p(),e.fn.wc_product_gallery||"undefined"===typeof wc_single_product_params?delete d["wc-single-product"]:d["wc-single-product"]&&b.LoadAsync(d["wc-single-product"],function(){k("wc-single-product");b.trigger("tf_init_photoswipe")},-1===d["wc-single-product"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==e.fn.wc_product_gallery})); d["js-cookie"]?b.LoadAsync(d["js-cookie"],function(){k("js-cookie");b.LoadAsync(d["wc-cart-fragments"],function(){k("wc-cart-fragments")},-1===d["wc-cart-fragments"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==themify_vars.wc_js_normal});!0===l&&n()},-1===d["js-cookie"].indexOf("ver=",12)?h:!1,null,function(){return!!window.Cookies}):n()},x=function(a,c,b,e){!1===g&&(g=!0,l(a,c,b,e))};b.body.one("added_to_cart removed_from_cart",x).on("click.tf_wc_click",".ajax_add_to_cart,.remove_from_cart_button", function(a){a.preventDefault();a.stopImmediatePropagation();a.target.classList.contains("loading")||(q.push(a.target),a.target.classList.add("loading"));!1===g&&(g=!0,l(a))});if(null!==m){const a=function(c){if(m&&!r){const e=b.isTouch?"touchstart":"mousemove";window.removeEventListener("scroll",a,{once:!0,passive:!0});window.removeEventListener(e,a,{once:!0,passive:!0});m.removeEventListener("change",a,{once:!0,passive:!0});c&&"change"===c.type&&c.stopImmediatePropagation();!1===g&&(g=r=!0,l("load"))}}; window.addEventListener("scroll",a,{once:!0,passive:!0});window.addEventListener(b.isTouch?"touchstart":"mousemove",a,{once:!0,passive:!0});m.addEventListener("change",a,{once:!0,passive:!0});b.requestIdleCallback(a,1500)}t&&t.addEventListener("change",w,{passive:!0,once:!0});for(let a=n.length-1;-1<a;a--){let c=parseFloat(n[a].min);0<=c&&parseFloat(n[a].value)<c&&(n[a].value=c)}delete themify_vars.wc_js["wc-add-to-cart-variation"];delete themify_vars.wc_js.wc_additional_variation_images_script;b.on("tf_wc_init", function(a){!0===a||f.getElementsByClassName("woocommerce-input-wrapper")[0]||f.getElementsByClassName("woocommerce-store-notice")[0]?l("load"):l(!0);b.trigger("tf_init_photoswipe")}).on("tf_init_photoswipe",function(a){if(e.fn.wc_product_gallery&&"undefined"!==typeof wc_single_product_params)if(wc_single_product_params.photoswipe_enabled){a||(a=f);a=a.getElementsByClassName("woocommerce-product-gallery");for(let b=a.length-1;-1<b;--b){var c=e(a[b]);c.data("product_gallery")||(c.wc_product_gallery(wc_single_product_params), (c=c.data("flexslider"))&&setTimeout(c.resize.bind(c),100));p||(c=a[b].getElementsByClassName("woocommerce-product-gallery__trigger")[0])&&c.addEventListener("click",z,{once:!0})}}else b.off("tf_init_photoswipe")}).trigger("tf_init_photoswipe")})(jQuery,Themify,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка