PageSourceSearch

https://www.umiperformance.com/wp-content/themes/woodmart/js/scripts/wc/woodmartCompare.min.js?ver=8.6.1

js umiperformance.com collected 2026-09-26 08:36:40 UTC 7,775 bytes, 1 lines download raw bytes

1!function(e){woodmartThemeModule.$document.on("wdShopPageInit wdUpdateWishlist wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.woodmartCompare()}),woodmartThemeModule.woodmartCompare=function(){var t=woodmartThemeModule.$body,o="woodmart_compare_list",a="";function r(t){var a=e(this),r=a.data("id"),n=e(`.wd-compare-btn a[data-id='${r}']`),d=e(".wd-header-compare");if(n.hasClass("added"))return!0;if(t.preventDefault(),!d.find(".wd-dropdown-compare").length){var i=[],s=Cookies.get(o);return void 0!==s&&s&&(i=Object.values(JSON.parse(s))),i.length&&-1!==i.indexOf(r.toString())||i.push(r.toString()),m(i.length),Cookies.set(o,JSON.stringify(i),{expires:parseInt(woodmart_settings.cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),void c(n)}a.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_compare",id:r},dataType:"json",method:"GET",success:function(t){if(t.count){var a=e(".wd-header-compare");a.length>0&&a.find(".wd-tools-count").text(t.count),c(n)}else console.log("something wrong loading compare data ",t);t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments)))},error:function(){console.log("We cant add to compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){n.removeClass("loading")}})}function n(t){t.stopImmediatePropagation(),t.preventDefault();var d=e(this).data("id").toString(),i=e(`.wd-compare-btn a[data-id='${d}']`),s=[];a&&(s=Object.values(JSON.parse(a))),s=s.filter(function(e){return e!==d}),Cookies.set(o,JSON.stringify(s),{expires:parseInt(woodmart_settings.cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),a=Cookies.get(o),i.removeClass("added"),i.find(".wd-action-text").length>0?i.find(".wd-action-text").text(woodmart_settings.compare_origin_button_text):i.text(woodmart_settings.compare_origin_button_text),i.off("click",n),i.on("click",r),woodmartThemeModule.$document.trigger("wdUpdateTooltip",i),m(s.length)}function d(t,a){var r=a.find(".wd-loader-overlay");r.addClass("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_category_from_compare",category_id:t,key:woodmart_settings.compare_page_nonce},dataType:"json",method:"GET",success:function(t){t.table?(i(t),t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments)))):console.log("something wrong loading compare data ",t)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){r.removeClass("wd-loading");var t=e(".wd-compare-table").first();setTimeout(function(){t.addClass("wd-active")},100),setTimeout(function(){t.addClass("wd-in"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}})}function i(t){var o=e(".wd-header-compare"),a=e(".wd-compare-table, .wd-compare-page");o.length>0&&o.find(".wd-tools-count").text(t.count),woodmartThemeModule.removeDuplicatedStylesFromHTML(t.table,function(e){a.replaceWith(e)},a),void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category&&woodmartThemeModule.$document.trigger("wdTabsInit")}function s(){jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_get_fragment_product_category_compare"},dataType:"json",method:"GET",success:function(t){t.fragments?(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments))):console.log("something wrong loading compare data ",t)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")}})}function c(e){var t=woodmart_settings.compare_added_button_text;e.find(".wd-action-text").length>0?e.find(".wd-action-text").text(t):e.text(t),e.addClass("added"),woodmartThemeModule.$document.trigger("added_to_compare"),woodmartThemeModule.$document.trigger("wdUpdateTooltip",e)}function m(t){var o=e(".wd-header-compare");o.length>0&&o.find(".wd-tools-count").text(t)}woodmart_settings.is_multisite&&(o+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies&&(a=Cookies.get(o),function(){if(void 0!==woodmart_settings.compare_save_button_state&&"yes"===woodmart_settings.compare_save_button_state&&"undefined"!=typeof Cookies){var t=a?Object.values(JSON.parse(a)):[],o=t.length?e(t.map(e=>`.wd-compare-btn a[data-id='${e}']`).join(", ")):[];o.length&&e.each(o,function(t,o){var a=e(o);a.length&&!a.hasClass("added")&&(a.addClass("added"),a.find(".wd-action-text").length>0?a.find(".wd-action-text").text(woodmart_settings.compare_removed_button_text):a.text(woodmart_settings.compare_removed_button_text),a.off("
1click.wdCompareSaved").on("click.wdCompareSaved",n),woodmartThemeModule.$document.trigger("wdUpdateTooltip",a))})}}(),function(){var t=e(".wd-header-compare");if(!(t.length<=0)){if(void 0!==a)try{var r=JSON.parse(a);t.find(".wd-tools-count").text(r.length)}catch(n){console.log("cant parse cookies json")}else t.find(".wd-tools-count").text(0);if(void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category)try{!function(){if(woodmartThemeModule.supports_html5_storage){var t=JSON.parse(sessionStorage.getItem(o+"_fragments"));"undefined"==typeof actions||"1"!==actions.is_lang_switched&&"1"!==actions.force_reset||(t=""),t?e.each(t,function(t,o){e(t).replaceWith(o)}):s()}else s()}()}catch(n){s()}}}(),t.off(".wdCompare"),t.on("click.wdCompare",".wd-compare-btn a",r),t.on("click.wdCompare",".wd-compare-remove",function(t){t.preventDefault();var a=e(this),r=a.data("id"),n="";void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category&&(n=a.parents(".wd-compare-table").data("category-id"))&&1>=a.parents(".compare-value").siblings().length?d(n,a.parents(".wd-compare-page")):(a.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_compare",id:r,category_id:n,key:woodmart_settings.compare_page_nonce},dataType:"json",method:"GET",success:function(t){t.table?(i(t),t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments)))):console.log("something wrong loading compare data ",t)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){a.removeClass("loading")}}))}),t.on("change.wdCompare",".wd-compare-select",function(t){t.preventDefault();var o=e(this),a=o.parents(".wd-compare-page"),r=a.find(".wd-compare-table[data-category-id="+o.val()+"]"),n=a.find(".wd-compare-table.wd-active");a.find(".wd-compare-cat-link").attr("href",r.data("category-url")),n.removeClass("wd-in"),setTimeout(function(){n.removeClass("wd-active")},100),setTimeout(function(){r.addClass("wd-active")},100),setTimeout(function(){r.addClass("wd-in"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}),t.on("click.wdCompare",".wd-compare-remove-cat",function(t){t.preventDefault();var o=e(this);d(o.parents(".wd-compare-header").find(".wd-compare-select").val(),o.parents(".wd-compare-page"))}))},window.addEventListener("pageshow",function(){var t=e(".wd-compare-select");if(t.length){var o=e(".wd-compare-table.wd-active");o.length&&o.data("category-id").toString()===t.val().toString()||t.trigger("change.wdCompare")}}),e(document).ready(function(){woodmartThemeModule.woodmartCompare()})}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.