https://reisebuero-jaap.de/wp-content/plugins/smg-technology/public/js/smg-gallery-slider.js?ver=7.1
1(function(){ 2 function loadCore(then){ 3 if (window.SmgSlider) { then(); return; } 4 const current = document.currentScript || (function(){ 5 const scripts = Array.from(document.getElementsByTagName('script')); 6 return scripts.find(s => (s.src||'').includes('smg-gallery-slider.js')); 7 })(); 8 const base = current && current.src ? current.src.replace(/smg-gallery-slider\.js(?:\?.*)?$/, '') : ''; 9 const s = document.createElement('script'); 10 s.src = base + 'smg-slider-core.js'; 11 s.defer = true; 12 s.onload = then; 13 document.head.appendChild(s); 14 } 15 16 function start(){ 17 // Try Beach selectors first 18 let grid = document.querySelector('.beach-galerie-slider'); 19 let pagination = document.querySelector('.beach-galerie-pagination'); 20 let dotClass = 'beach-dot'; 21 let pagContainerClass = 'beach-galerie-pagination'; 22 23 // Fallback to Travel selectors 24 if (!grid || !pagination) { 25 grid = document.querySelector('.travel-galerie-grid'); 26 pagination = document.querySelector('.travel-galerie-pagination'); 27 dotClass = 'travel-galerie-dot'; 28 pagContainerClass = 'travel-galerie-pagination'; 29 } 30 31 if(!grid || !pagination) return; 32 33 const wrapper = grid.closest('.beach-galerie-slider-wrapper'); 34 const prevBtn = wrapper ? wrapper.querySelector('.beach-galerie-prev') : null; 35 const nextBtn = wrapper ? wrapper.querySelector('.beach-galerie-next') : null; 36 37 const imgs = Array.from(grid.children || []); 38 if(imgs.length <= 1){ 39 grid.classList.add('no-slider'); 40 pagination.hidden = true; 41 if (prevBtn) prevBtn.hidden = true; 42 if (nextBtn) nextBtn.hidden = true; 43 return; 44 } 45 46 const isBeach = grid.classList.contains('beach-galerie-slider'); 47 48 const slider = window.SmgSlider.init(grid, { 49 itemSelector: ':scope > a, :scope > img', 50 pagination: { 51 mode: 'element', 52 element: pagination, 53 classNames: { container: pagContainerClass, dot: dotClass } 54 }, 55 classes: { enabled: 'is-slider' }, 56 enable: () => isBeach || window.innerWidth <= 768, 57 mediaQuery: isBeach ? null : '(max-width: 768px)', 58 snap: { delay: 100 }, 59 a11y: { role: 'tablist', ariaLabel: 'Bildernavigation', announceActive: false } 60 }); 61 62 if (prevBtn && nextBtn) { 63 prevBtn.addEventListener('click', () => { 64 const active = slider.getActiveIndex(); 65 slider.scrollToIndex(Math.max(0, active - 1)); 66 }); 67 nextBtn.addEventListener('click', () => { 68 const active = slider.getActiveIndex(); 69 slider.scrollToIndex(Math.min(imgs.length - 1, active + 1)); 70 }); 71 } 72 } 73 74 if (document.readyState === 'loading') { 75 document.addEventListener('DOMContentLoaded', () => loadCore(start)); 76 } else { 77 loadCore(start); 78 } 79})();
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.