1var compo = {}; 2 3$(function ($) { 4 $.extend($.validator.messages, { 5 pattern: "ÐевеÑнÑй ÑоÑмаÑ" 6 }); 7 8 compo.analytics = $.compo.analytics({ 9 yandexMetrikaId: window.yandex_metrika_id || '', 10 userId: window.userId || null, 11 ip: window.ip 12 }); 13 14 compo.productsFilter = $.compo.productsFilter(); 15 16 compo.productsCompare = $.compo.productsCompare(); 17 18 compo.offer = $.compo.offer(); 19 20 compo.basket = $.compo.basket(); 21 22 compo.order = $.compo.order(); 23 24 compo.user = $.compo.user(); 25 26 compo.orderNavigation = $.compo.orderNavigation(); 27 28 $.compo.productModal(); 29 30 31 $.compo.popoverFix(); 32 $.compo.imagesReplace(); 33 $.compo.sidebarCanvas(); 34 $.compo.menuBrandsList(); 35 $.compo.fixHeightRows(); 36 37 38 $('.catalog-block-items-list').productsList(); 39 40 $('#advantages-modal').advantages(); 41 42 $('.text-overflow').textOverflow(); 43 44 $('[data-toggle="tooltip"]').tooltip(); 45 46 $('.panel-collapse-panel .collapse').panelCollapse(); 47 48 $('#header').find('.search input[name="keyword"]').productsSearch(); 49 $('.page-search #content .search .form-control').productsSearch(); 50 51 $('.modal-ajax').ajaxModal(); 52 53 54 55 $('.enableReview').click(function () { 56 var btn = $(this); 57 58 var url = btn.data('url'); 59 60 var visible = 1; 61 62 if (btn.data('visible') == 1) {
63 btn.data('visible', 0); 64 65 btn.removeClass('btn-success'); 66 btn.addClass('btn-danger'); 67 68 btn.text('СкÑÑÑ'); 69 70 visible = 0; 71 } else { 72 btn.data('visible', 1); 73 74 btn.removeClass('btn-danger'); 75 btn.addClass('btn-success'); 76 77 btn.text('ÐÑобÑажаеÑÑÑ'); 78 79 visible = 1; 80 } 81 82 $.get( url, { id: btn.data('id'), visible: visible }); 83 84 85 }); 86 87 $(window).on('ajaxComplete', function() { 88 setTimeout(function() { 89 $(window).lazyLoadXT(); 90 }, 50); 91 }); 92 93 var options = $.lazyLoadXT, 94 bgAttr = options.bgAttr || 'data-bg'; 95 96 options.selector += ',[' + bgAttr + ']'; 97 98 $(document).on('lazyshow', function (e) { 99 var $this = $(e.target); 100 if( typeof( $this.attr(bgAttr) ) != 'undefined' ) { 101 $this 102 .css('background-image', "url('" + $this.attr(bgAttr) + "')") 103 .removeAttr(bgAttr); 104 } 105 }); 106 107 108 var windowsize = $(window).width(); 109 110 if (windowsize <= 1024) { 111 $('.catalog-brands-show-more-widget').addClass('catalog-brands-show-more'); 112 } 113 114 $('.show-more-brands').click(function () { 115 $('.catalog-brands-show-more-widget').removeClass('catalog-brands-show-more'); 116 return false; 117 }); 118 119 if (windowsize <= 1024) { 120 $('.catalog-collections-show-more-widget').addClass('catalog-collections-show-more'); 121 } 122 123 $('.show-more-collections').click(function () { 124 $('.catalog-collections-show-more-widget').removeClass('catalog-collections-show-more'); 125 return false; 126 }); 127 128 $(window).on("compo.basket.add", function( event, data ) { 129 console.log('compo.basket.add to cart') 130 131 dataLayer?.push({ 132 event: 'dlyavannEvent_add_to_cart', 133 event_id: 'd-v1-e6', 134 event_param: { 135 product_id: data.item.id, 136 product_quantity: data.item.quantity 137 } 138 }); 139 }); 140 141 $(window).on("compo.basket.addSet", function( event, data ) { 142 143 dataLayer?.push({ 144 event: 'dlyavannEvent_add_to_cart', 145 event_id: 'd-v1-e6', 146 event_param: { 147 product_id: data.item.id, 148 product_quantity: 1 149 } 150 }); 151 152 $.each(data.complects, function( index, value ) { 153 dataLayer?.push({ 154 event: 'dlyavannEvent_add_to_cart', 155 event_id: 'd-v1-e6', 156 event_param: { 157 product_id: value.id, 158 product_quantity: 1 159 } 160 }); 161 }); 162 }); 163 164 // $(window).on("compo.basket.remove", function( event, data ) { 165 166 // console.log('compo.basket.remove') 167 // dataLayer?.push({ 168 // event: 'dlyavannEvent_remove_from_cart', 169 // event_id: 'd-v1-e7', 170 // event_param: { 171 // product_id: data.item.id, 172 // } 173 // }); 174 // }); 175 176 $(window).on("compo.order.checkout", function( event, data ) { 177 dataLayer?.push({ 178 event: 'dlyavannEvent_cart_view', 179 event_id: 'd-v1-e8', 180 event_param: {} 181 }); 182 }); 183 184 $(window).on("compo.order.purchase", function( event, data ) { 185 console.log(data); 186 dataLayer?.push({ 187 event: 'dlyavannEvent_purchase_complete', 188 event_id: 'd-v1-e9', 189 event_param: {} 190 }); 191 }); 192}); 193 194function showFeatures() { 195 try { document.querySelector('[data-tab="features"]').click(); } catch (error) { } 196} 197 198document.addEventListener('DOMContentLoaded', function() { 199 const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 200 201 if (isMobile) {
202 showFeatures(); 203 setTimeout(showFeatures, 400); 204 setTimeout(showFeatures, 1200); 205 setTimeout(showFeatures, 2000); 206 } 207 208});
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.