PageSourceSearch

https://www.infinitype.com/templates/joomaker/js/template.js?6918d5

js infinitype.com collected 2026-09-25 11:36:05 UTC 10,244 bytes, 337 lines download raw bytes

1/*  
2    - Gleicht die Höhen der Cellen aus
3    - produkte/softmaker-office/bestellen 
4*/
5
6if (window.matchMedia('(min-width: 768px)').matches) {
7
8    jQuery(window).on("load resize scroll", function () {
9        if ($('div').hasClass("smoProductTable")) {
10
11            function equalHeight(group) {
12                tallest = 0;
13                group.each(function () {
14                    thisHeight = $(this).height();
15                    if (thisHeight > tallest) {
16                        tallest = thisHeight;
17                    }
18                });
19                group.height(tallest);
20            }
21
22            equalHeight($(".equal0"));
23            equalHeight($(".equal1"));
24            equalHeight($(".equal2"));
25            equalHeight($(".equal3"));
26            equalHeight($(".equal4"));
27            equalHeight($(".equal5"));
28            equalHeight($(".equal6"));
29            equalHeight($(".equal7"));
30            equalHeight($(".equal8"));
31            equalHeight($(".equal9"));
32            equalHeight($(".equal10"));
33            equalHeight($(".equal11"));
34            equalHeight($(".equal12"));
35            equalHeight($(".equal13"));
36            equalHeight($(".equal14"));
37            equalHeight($(".equal15"));
38            equalHeight($(".equal16"));
39            equalHeight($(".equal17"));
40            equalHeight($(".equal18"));
41            equalHeight($(".equal19"));
42            equalHeight($(".equal20"));
43
44        }
45
46    });
47}
48
49
50// --------------------------------------------- >
51
52
53$(document).ready(function () {
54
55    /* Every time the window is scrolled ... */
56    $(window).scroll(function () {
57
58        /* Check the location of each desired element */
59        $('.fade-in').each(function (i) {
60
61            var bottom_of_object = $(this).position().top + $(this).outerHeight();
62            var bottom_of_window = $(window).scrollTop() + $(window).height();
63
64            /* If the object is completely visible in the window, fade it it */
65            if (bottom_of_window > bottom_of_object) {
66
67                $(this).animate({
68                    'opacity': '1'
69                }, 500);
70            }
71        });
72    });
73
74
75    /* 
76        - Lässt Multi-Carousel-items nacheinander durchlaufen  
77        - produkte/schriften/handschriften
78        - Basiscode: https://codingyaar.com/bootstrap-carousel-multiple-items-increment-by-1/
79    */
80    if (document.querySelector('.carousel-2, .carousel-3, .carousel-4, .carousel-5') !== null) {
81
82        $(".carousel-fonts .carousel-item").first().addClass("active");
83
84
85        var multipleCardCarousel = document.querySelector(".carousel-control-prev, carousel-control-next");
86
87        if (window.matchMedia("(min-width: 768px)").matches) {
88
89
90            var carousel = new bootstrap.Carousel(multipleCardCarousel, {
91                interval: false,
92            });
93            var carouselWidth = $(".carousel-inner")[0].scrollWidth;
94            var itemWidth = $(".carousel-item").width();
95            var scrollPosition = 0;
96
97            $(".carousel-control-next").on("click", function () {
98                if (scrollPosition < carouselWidth - itemWidth * 1) {
99                    scrollPosition += itemWidth;
100                    $(".carousel-inner").animate({
101                            scrollLeft: scrollPosition,
102                        },
103                        600,
104                    );
105                }
106            });
107            $(".carousel-control-prev").on("click", function () {
108                if (scrollPosition > 0) {
109                    scrollPosition -= itemWidth;
110                    $(".carousel-inner").animate({
111                            scrollLeft: scrollPosition
112                        },
113                        600
114                    );
115                }
116            });
117        } else {
118            $(".carousel").addClass("slide");
119        }
120
121
122        //Muss überarbeitet werden.
123        var myCarousel = document.querySelector('.Carousel')
124        var carousel = new bootstrap.Carousel(myCarousel, {
125            interval: 200,
126            wrap: false
127        })
128
129    }
130    // ---> END
131});
132
133// --------------------------------------------- >
134
135/* 
136    - TwentyTwenty slider before after 
137*/
138
139jQuery(window).on("load", function () {
140    if ($('div').hasClass("twentytwenty-container")) {
141
142
143        jQuery(".twentytwenty-container[data-orientation!='vertical']").twentytwenty({
144            default_offset_pct: 0.5
145        });
146        jQuery(".twentytwenty-container[data-orientation='vertical']").twentytwenty({
147            default_offset_pct: 0.5,
148            orientation: 'vertical'
149        });
150    }
151});
152
153// --------------------------------------------- >
154
155/* 
156    - Setzt DIVs auf gleiche höhe
157    - shop/schriften/fuer-zu-hause-und-buero 
158*/
159
160$(window).on('load resize', function () {
161
162    var maxHeight = 0;
163
164    $('.h-equal').each(function () {
165        if ($(this).height() > maxHeight) {
166            maxHeight = $(this).height();
167        }
168    });
169
170    $('.h-equal').height(maxHeight);
171});
172
173/* 
174    - In den Shop-Cards der Schriften muss "h-equal" wieder entfernt werden
175      sonst öffnet das Bestellen-Modal nicht in der richtigen Größe
176    - siehe: softmaker.de/produkte/schriften/handschriften
177*/
178$('a[data-bs-toggle="modal"]').click(function () {
179    $('div').removeClass('h-equal');
180    $('.card').removeAttr('style');
181});
182
183
184// --------------------------------------------- >
185
186$(window).on('load resize', function () {
187    /* 
188        - Das Script kopiert den Text aus dem Menü
189        - in den Button Zeile 33 in der sidebar-left.php ein
190    */
191
192    if (window.matchMedia('(max-width: 991px)').matches) {
193        $('.sidebar .JMobileSidebar').replaceWith('<div class="d-lg-none JMobileSidebar-Text">' + $('.sidebar li.current.active').html() + '</div>');
194        $(".sidebar .JMobileSidebar-Text a").replaceWith(function () {
195            return $(this).contents();
196        });
197    } else {
198
199    }
200});
201
202// --------------------------------------------- >
203
204window.addEventListener('load', function () {
205
206    /*
207        - OS detect 
208     */
209    function getOS() {
210        var userAgentData = window.navigator.userAgentData,
211            platform = window.navigator.platform,
212            macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'],
213            windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],
214            iosPlatforms = ['iPhone', 'iPad', 'iPod'],
215            os = null;
216
217        if (macosPlatforms.indexOf(platform) !== -1) {
218            $('.MacOS').removeClass('d-none')
219        } else if (iosPlatforms.indexOf(platform) !== -1) {
220            $('.iOS').removeClass('d-none')
221        } else if (windowsPlatforms.indexOf(platform) !== -1) {
222            $('.WinOS').removeClass('d-none')
223        } else if (/Android/.test(userAgentData)) {
224            $('.Android').removeClass('d-none')
225        } else if (!os && /Linux/.test(platform)) {
226            $('.Linux').removeClass('d-none')
227        }
228        return os;
229    }
230    //OS output
231    getOS();
232
233    /*
234        - Startet das Modal und gleichzeit den Download für die OS-Detect Buttons
235    */
236    $('.popup_macos_trigger').click(function () {
237        setTimeout(function () {
238            $('#popup_macos').modal('show');
239        }, 250);
240    });
241    $('.popup_windows_trigger').click(function () {
242        setTimeout(function () {
243            $('#popup_windows').modal('show');
244        }, 250);
245    });
246
247});
248
249// --------------------------------------------- >
250
251
252/* Die Carousel-Schriften-Bilder werden per PHP geladen. */
253
254/* (1) Setzt die Class active für das erste "carousel-item" */
255$('.carousel-fonts .carousel-item').eq(2).addClass('active');
256
257
258/* (2) Setzt eine mindest Bilderanzahl für den Slider */
259let items = document.querySelectorAll('.carousel-fonts.carousel .carousel-item')
260
261items.forEach((el) => {
262    const minPerSlide = 4
263    let next = el.nextElementSibling
264    for (var i = 1; i < minPerSlide; i++) {
265        if (!next) {
266            // wrap carousel by using first child
267            next = items[0]
268        }
269        let cloneChild = next.cloneNode(true)
270        el.appendChild(cloneChild.children[0])
271        next = next.nextElementSibling
272    }
273});
274
275// --------------------------------------------- >
276
277
278
279/* 
280Blog-Sprache DE/EN umstellen. 
281Die Classes sind im Joomal-Blog-Linktyp gesetzt.
282Das Modal ist unter Module (Nr: 132) zu finden.
283*/
284
285$(document).ready(function () {
286
287
288    // Enfernt die CLASSen zum öffnen der Modals in EN und DE
289    // Die CLASSen sind u.a. in den Joomla Menü-Blog eingetragen
290    $("html:lang(en-gb) a, html:lang(de-de) a").removeClass("go-to-blog-en go-to-bytes-and-beyond-en go-to-softMaker-office-en go-to-flexipdf-en go-to-typography-en");
291
292    // Öffnet die Modals mit Weiterleitung zu den Kategorien
293    $("a.go-to-blog-en").attr({
294        'data-bs-toggle': "modal",
295        'data-bs-target': "#go-to-blog-en"
296    });
297    $("a.go-to-bytes-and-beyond-en").attr({
298        'data-bs-toggle': "modal",
299        'data-bs-target': "#go-to-bab-en"
300    });
301    $("a.go-to-softMaker-office-en").attr({
302        'data-bs-toggle': "modal",
303        'data-bs-target': "#go-to-smo-en"
304    });
305    $("a.go-to-flexipdf-en").attr({
306        'data-bs-toggle': "modal",
307        'data-bs-target': "#go-to-flexipdf-en"
308    });
309    $("a.go-to-typography-en").attr({
310        'data-bs-toggle': "modal",
311        'data-bs-target': "#go-to-typo-en"
312    });
313
314    if (document.querySelector('.layout-blog') !== null) {
315
316        // Öffnet das Modal zurück zur Hompage
317        $('.lang-block li:not(:nth-child(-n+2)) a').attr({
318            'data-bs-toggle': "modal",
319            'data-bs-target': "#go-to-home"
320        });
321
322
323        // Löscht blog und alles dahinter weg
324        $('.lang-block li:not(:nth-child(-n+2)) a').each(function () {
325            if (this.href.indexOf("/") != -1) {
326                var href = this.href.split("blog")[0];
327                this.href = href;
328            }
329        });
330    }
331});
332
333/* Zeigt Tooltips beim Hovern über dem gepunkteten Text an */
334var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
335var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
336  return new bootstrap.Tooltip(tooltipTriggerEl)
337})

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.