1// Splide initialization delayed to improve page load performance 2setTimeout(() => { 3 4 // --- Load Splide CSS --- 5 let styleEl = document.createElement("link"); 6 styleEl.rel = "stylesheet"; 7 styleEl.type = "text/css"; 8 styleEl.href = "/cdnstatic/system/CSSz/splide/splide.min.css"; 9 document.head.appendChild(styleEl); 10 11 // --- Load Splide JS --- 12 let splideScripts = [ 13 "/cdnstatic/system/Javascriptz/splide/splide.min.js", 14 ]; 15 16 let splideScriptsPromises = []; 17 splideScripts.forEach((url) => { 18 splideScriptsPromises.push( 19 new Promise(function (resolve, reject) { 20 let scriptEl = document.createElement("script"); 21 scriptEl.src = url; 22 scriptEl.async = false; 23 scriptEl.onload = function () { 24 resolve(url); 25 }; 26 scriptEl.onerror = function () { 27 reject(url); 28 }; 29 document.body.appendChild(scriptEl); 30 }) 31 ); 32 }); 33 34 Promise.all(splideScriptsPromises).then(() => { 35 36 // --- Initialize Splide sliders --- 37 const splideElements = document.querySelectorAll(".splide.splide--custom"); 38 let sliderInitialized = false; 39 40 splideElements.forEach(function (splideElement) { 41 const slideCount = splideElement.querySelectorAll(".splide__slide").length; 42 const sliderType = splideElement.getAttribute("data-slider-type"); 43 const sliderAutoplay = splideElement.getAttribute("data-slider-autoplay"); 44 const sliderAutoplayInterval = splideElement.getAttribute("data-slider-autoplayInterval"); 45 const sliderPagination = splideElement.getAttribute("data-slider-pagination"); 46 const sliderArrows = splideElement.getAttribute("data-slider-arrows"); 47 const useProgressbar = splideElement.getAttribute("data-slider-progressbar"); 48 const slidesPerPage = splideElement.getAttribute("data-slider-perPage"); 49 const slideGap = splideElement.getAttribute("data-slider-gap"); 50 const sliderBreakpoints = splideElement.getAttribute("data-slider-breakpoints"); 51 const slideHeight = splideElement.getAttribute("data-slider-height"); 52 53 //Skip initialization if only one Slide 54 if (slideCount <= 1) { 55 return; 56 } 57 58 sliderInitialized = true; 59 60 const sanitized_sliderBreakpoints = sliderBreakpoints 61 ? sliderBreakpoints.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ') 62 : ""; 63 64 let splideElementOptions = {}; 65 splideElementOptions.perPage = slidesPerPage || 1; 66 splideElementOptions.gap = slideGap || "1em"; 67 splideElementOptions.type = sliderType || "loop"; 68 splideElementOptions.autoplay = sliderAutoplay === "true"; 69 splideElementOptions.interval = sliderAutoplayInterval; 70 splideElementOptions.arrows = sliderArrows === "true"; 71 splideElementOptions.pagination = sliderPagination === "true"; 72 splideElementOptions.progressbar = useProgressbar === "true"; 73 splideElementOptions.drag = slideCount > slidesPerPage; 74 splideElementOptions.fixedHeight = slideHeight; 75 76 splideElementOptions.classes = { 77 pagination: 'bemContentSlider__pagination splide__pagination', 78 page: 'bemContentSlider__pagination__page splide__pagination__page' 79 }; 80 81 try { 82 splideElementOptions.breakpoints = sanitized_sliderBreakpoints 83 ? JSON.parse(sanitized_sliderBreakpoints) 84 : {}; 85 } catch (e) { 86 console.warn("Fehler beim Parsen von Breakpoints:", e); 87 } 88 89 const splideObject = new Splide(splideElement, splideElementOptions); 90 splideObject.mount(); 91 }); 92 93 if (sliderInitialized) { 94 const staticBanner = document.querySelector(".bemDiBanner > picture"); 95 if (staticBanner) { 96 staticBanner.remove(); 97 } 98 } 99 }).catch((err) => { 100 console.error("Error loading Splide scripts:", err); 101 }); 102 103}, 5000);
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.