PageSourceSearch

https://www.batoobike.ch/cdn/shop/t/35/assets/banner-grid.js?v=49814975896405760291776158609

js batoobike.ch collected 2026-10-08 10:51:50 UTC 2,438 bytes, 2 lines download raw bytes

1(()=>{let bannerGridSlider;const initSlider=slider=>{slider.classList.add("swiper");const wrapper=slider.querySelector(".banner-grid__grid");if(!wrapper)return;wrapper.classList.add("swiper-wrapper");const slides=slider.querySelectorAll(".banner-grid__card");!slides||!slides.length||(slides.forEach(slide=>{slide.classList.add("swiper-slide")}),bannerGridSlider=new Swiper(slider,{loop:!1,slidesPerView:1.1,spaceBetween:16,speed:1e3,mousewheel:{forceToAxis:!0}}))},destroySlider=section=>{if(!section||!section?.classList.contains("banner-grid-section"))return;const slider=section.querySelector(".banner-grid-slider"),slides=section.querySelectorAll(".banner-grid__card"),wrapper=section.querySelector(".banner-grid__grid");!slider||!slides||!slides.length||!wrapper||(slider.classList.remove("swiper"),slides.forEach(slide=>{slide.classList.remove("swiper-slide")}),wrapper.classList.remove("swiper-wrapper"),bannerGridSlider.destroy(!0,!0),bannerGridSlider=null)},calcHeightButton=(section,width)=>{let parent;document.currentScript?parent=document.currentScript.parentElement:parent=section,parent.querySelectorAll(".banner-grid__card_full-link").forEach(card=>{const button=card.querySelector(".banner-grid__button");let heightButton;button&&width>=750?heightButton=button.getBoundingClientRect().height+parseFloat(window.getComputedStyle(button,null).getPropertyValue("margin-top")):width<750?heightButton=16:heightButton=24,card.style=`--height-button: ${heightButton}px`,card.querySelector(".banner-grid__top")?card.querySelector(".banner-grid__top").style.marginBottom=heightButton+"px":card.querySelector(".banner-grid__title-content")&&(card.querySelector(".banner-grid__title-content").style.marginTop=heightButton+"px")})},initSection=section=>{let sectionBannerGrid;if(document.currentScript?sectionBannerGrid=document.currentScript.parentElement:sectionBannerGrid=section,!sectionBannerGrid)return;const slider=sectionBannerGrid.querySelector(".banner-grid-slider");new ResizeObserver(entries=>{const[entry]=entries;calcHeightButton(sectionBannerGrid,entry.contentRect.width),entry.contentRect.width<576&&slider?initSlider(slider):bannerGridSlider&&destroySlider(sectionBannerGrid)}).observe(sectionBannerGrid)};initSection(),document.addEventListener("shopify:section:load",function(section){initSection(section.target)})})();
2//# sourceMappingURL=/cdn/shop/t/35/assets/banner-grid.js.map?v=49814975896405760291776158609

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.