PageSourceSearch

https://xd-i.com/wp-content/themes/xdi/assets/js/smooth-scroll.js?ver=1.3

js xd-i.com collected 2026-10-06 16:36:49 UTC 2,350 bytes, 58 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function() {
2    const links = document.querySelectorAll(".smoothScroll");
3    for (const link of links) {
4        link.addEventListener("click", clickHandler);
5    }
6    function clickHandler(e) {
7        e.preventDefault();
8        const href = this.getAttribute("href");
9        const isProductSlider = document.querySelector(href);
10        const slideToProductSlider = isProductSlider && (isProductSlider.classList.contains("fl-module-product-slider") || isProductSlider.querySelector(".fl-module-product-slider"));
11        // adds for productslider
12        if ( slideToProductSlider ) {
13
14            // alle hidden aus swiper slides raus
15            // alle filter btns active raus
16            const slides = isProductSlider.querySelectorAll('.swiper-slide');
17            if ( slides ) {
18                slides.forEach((elem) => {
19                    elem.classList.remove('hidden');
20                });
21            }
22            const btns = isProductSlider.querySelectorAll('.filterBtn');
23            if ( btns ) {
24                btns.forEach((elem) => {
25                    elem.classList.remove('active');
26                });
27            }
28
29            let formatValue = this.dataset.format;
30            let themeValue = this.dataset.thema;
31
32            if ( formatValue && formatValue !== "" ) {
33                let formatValues = formatValue.split(",");
34                if ( formatValues.length > 0 ) {
35                    formatValues.forEach(value => {
36                        const clickValue = document.querySelector('[data-type="format"][data-value="'+value+'"]');
37                        if ( clickValue ) clickValue.click();
38                    });
39                }
40            }
41
42            if ( themeValue && themeValue !== "") {
43                let themenValues = themeValue.split(",");
44                if ( themenValues.length > 0 ) {
45                    themenValues.forEach(value => {
46                        const clickValue = document.querySelector('[data-type="thema"][data-value="'+value+'"]');
47                        if ( clickValue ) clickValue.click();
48                    });
49                }
50            }
51        }
52        if ( isProductSlider ) {
53            isProductSlider.scrollIntoView({
54                behavior: "smooth",
55            });
56        }
57    }
58});

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.