1class MainJS { 2 constructor() { 3 this.documentReady = this.documentReady.bind(this); 4 this.getReadyState = this.getReadyState.bind(this); 5 } 6 getReadyState() { 7 if (document.readyState === 'complete' && window.jQuery && typeof jQuery !== 'undefined' && typeof $.fn.slick === 'function') { 8 this.documentReady(); 9 } else { 10 window.setTimeout(() => { 11 this.getReadyState(); 12 }, 100); 13 } 14 } 15 16 documentReady() { 17 let $root = $('html, body'); 18 19 // After-Load-Script 20 document.documentElement.style.setProperty('--scrollbar-width', `${window.innerWidth - document.documentElement.clientWidth}px`); 21 22 // check for theme cards slider 23 console.info('check for theme cards slider'); 24 if ($('.cards-as-slider').length) { 25 console.info('theme cards slider container found'); 26 $('.cards-as-slider').slick({ 27 infinite: false, 28 arrows: true, 29 dots: false, 30 autoplay: false, 31 autoplaySpeed: 2000, 32 speed: 1000, 33 swipeToSlide: true, 34 slidesToShow: 3, 35 centerMode: false, 36 centerPadding: 0, 37 responsive: [{ 38 breakpoint: 991, 39 settings: { 40 slidesToShow: 2, 41 slidesToScroll: 1 42 } 43 }, { 44 breakpoint: 767, 45 settings: { 46 slidesToShow: 1, 47 slidesToScroll: 1 48 } 49 }], 50 }); 51 } 52 53 /* lightbox adjusting 54 https://lokeshdhakar.com/projects/lightbox2/#options 55 */ 56 if (typeof lightbox === 'object') { 57 console.info('lightbox initialized'); 58 lightbox.option({ 59 'resizeDuration': 500, 60 'disableScrolling': true, 61 'alwaysShowNavOnTouchDevices': true 62 }) 63 } 64 65 // accordion handling 66 $('.ce_accordion input + label, .ce_treatment_accordeon .items-container input + label').on('click', function () { 67 let clicked_toggler = $(this), 68 radio_button = $(this).closest('.toggler').find('input'), 69 active_item = clicked_toggler.parents('.accordion-item'); 70 71 if (radio_button.is(':checked')) { 72 setTimeout(() => { 73 radio_button.prop('checked', false); 74 }, 100); 75 } 76 77 setTimeout(function () { 78 let togglerTop = parseInt(active_item.offset().top); 79 if ($(window).width() < 750) { 80 togglerTop = togglerTop + 0; 81 } 82 if ($(window).width() < 1200) { 83 togglerTop = togglerTop - 50; 84 } else { 85 togglerTop = togglerTop - $('.header-top').height() - 20; 86 } 87 $root.animate({ 88 scrollTop: togglerTop 89 }, 300); 90 }, 300); 91 }) 92 93 // check for interalp ratebox 94 // setTimeout(function () { 95 // let rateBox = $('#rateboxModal'); 96 // console.info('check for interalp ratebox'); 97 // if(rateBox.length) { 98 // console.info('interalp ratebox found'); 99 // let rateBoxShown = sessionStorage.getItem('PopupShown'); 100 // if(!rateBoxShown) { 101 // rateBox.addClass('show'); 102 // sessionStorage.setItem('PopupShown', 'yes'); 103 // } else { 104 // rateBox.removeClass('in'); 105 // } 106 // } 107 // }, 1000); 108 } 109} 110 111const mainjs_class = new MainJS(); 112window.setTimeout(mainjs_class.getReadyState, 100);
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.