1// ÐниÑиализаÑÐ¸Ñ Swiper в каÑÑоÑÐºÐ°Ñ ÑоваÑа на ÑÑÑаниÑе «Рмагазине» (локалÑнÑй swiper-bundle). 2(function () { 3 function init() { 4 if (typeof Swiper === "undefined") return; 5 document.querySelectorAll(".js-card-swiper").forEach(function (el) { 6 var pag = el.querySelector(".swiper-pagination"); 7 if (!pag) return; 8 new Swiper(el, { 9 slidesPerView: 1, 10 spaceBetween: 0, 11 watchOverflow: true, 12 observer: true, 13 observeParents: true, 14 pagination: { 15 el: pag, 16 clickable: true, 17 }, 18 }); 19 }); 20 } 21 22 var resizeTimer; 23 function onResize() { 24 clearTimeout(resizeTimer); 25 resizeTimer = setTimeout(function () { 26 document.querySelectorAll(".js-card-swiper").forEach(function (el) { 27 if (el.swiper) el.swiper.update(); 28 }); 29 }, 100); 30 } 31 32 if (document.readyState === "loading") { 33 document.addEventListener("DOMContentLoaded", init); 34 } else { 35 init(); 36 } 37 38 window.addEventListener("resize", onResize); 39})();
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.