1//logo on scroll 2window.addEventListener('scroll', function () { 3 const hiddenlogo = document.querySelector('.hidden-logo'); 4 if (hiddenlogo) { 5 if (window.scrollY > 100) { // Adjust scroll threshold as needed 6 hiddenlogo.classList.add('scrolled'); 7 } else { 8 hiddenlogo.classList.remove('scrolled'); 9 } 10 } 11}); 12 13/* style buttons btn-primary, btn-secondary btn-default*/ 14 15document.addEventListener('DOMContentLoaded', () => { 16 // Mapping Original-Button-Class 17 const buttonTypes = { 18 'btn-primary': 'btn-primary-complex', 19 'btn-secondary': 'btn-secondary-complex', 20 'btn-default': 'btn-primary-complex', 21 }; 22 23 // find all with class names 24 const buttons = document.querySelectorAll('a.btn-primary, a.btn-secondary, a.btn-default'); 25 26 buttons.forEach(btn => { 27 const text = btn.textContent.trim(); 28 29 // find the class name and replace it 30 const baseClass = Object.keys(buttonTypes).find(cls => btn.classList.contains(cls)); 31 const complexClass = buttonTypes[baseClass]; 32 33 // create new <a>-Button 34 const complexButton = document.createElement('a'); 35 complexButton.href = btn.getAttribute('href') || '#'; 36 complexButton.target = btn.getAttribute('target') || '_self'; 37 complexButton.className = `btn-complex ${complexClass} form-btn d-flex align-items-center geko-arrow-wrapper`; 38 complexButton.innerHTML = ` 39 <span class="marker-line">${text}</span> 40 <div class="geko-arrow" aria-hidden="true"></div> 41 `; 42 43 // replace the the <a> 44 btn.replaceWith(complexButton); 45 }); 46}); 47 48/* news zuruck to overwiev link */ 49document.addEventListener('DOMContentLoaded', () => { 50 const newsoverviewlink = document.querySelector('.link-to-page-overview'); 51 const breadcrumboverviewlink = document.querySelector('.breadcrumb-back-to-overview'); 52 53 if (newsoverviewlink && breadcrumboverviewlink) { 54 console.log('links') 55 const href = newsoverviewlink.getAttribute('href'); 56 if (href) { 57 58 breadcrumboverviewlink.setAttribute('href', href); 59 60 } 61 } 62}); 63 64 65/*This script enables the ability to jump to collapsed accordion items via section index contentelement*/ 66document.addEventListener('DOMContentLoaded', () => { 67 const SCROLL_OPTIONS = { behavior: 'smooth', block: 'start' }; 68 69 function openParentsAndScrollTo(target) { 70 if (!target) return; 71 const parents = []; 72 let el = target.parentElement; 73 while (el) { 74 if (el.classList && el.classList.contains('collapse')) { 75 parents.push(el); 76 } 77 el = el.parentElement; 78 } 79 80 function showCollapse(collapseEl) { 81 return new Promise((resolve) => { 82 if (collapseEl.classList.contains('show')) { 83 resolve(); 84 return; 85 } 86 const controller = bootstrap.Collapse.getOrCreateInstance(collapseEl, { toggle: false }); 87 const onShown = () => { 88 collapseEl.removeEventListener('shown.bs.collapse', onShown); 89 resolve(); 90 }; 91 collapseEl.addEventListener('shown.bs.collapse', onShown); 92 controller.show(); 93 }); 94 } 95 96 parents.reverse().reduce( 97 (p, collapseEl) => p.then(() => showCollapse(collapseEl)), 98 Promise.resolve() 99 ).then(() => { 100 const previousTabIndex = target.getAttribute('tabindex'); 101 target.setAttribute('tabindex', '-1'); 102 target.focus({ preventScroll: true }); 103 target.scrollIntoView(SCROLL_OPTIONS); 104 if (previousTabIndex === null) target.removeAttribute('tabindex'); 105 else target.setAttribute('tabindex', previousTabIndex); 106 }); 107 } 108 109 function handleAnchorNavigation(hash) { 110 if (!hash) return; 111 const id = hash.replace(/^#/, ''); 112 const target = document.getElementById(id); 113 if (!target) return; 114 openParentsAndScrollTo(target); 115 } 116 117 document.addEventListener('DOMContentLoaded', function () { 118 handleAnchorNavigation(window.location.hash); 119 }); 120 121 document.addEventListener('click', function (e) { 122 const a = e.target.closest('a[href^="#"], a[href*="#"]'); 123 if (!a) return; 124 const url = new URL(a.href, window.location.href); 125 if (url.pathname !== window.location.pathname) return; 126 127 const hash = url.hash; 128 if (!hash) return; 129 e.preventDefault(); 130 if (window.location.hash !== hash) history.pushState(null, '', hash); 131 handleAnchorNavigation(hash); 132 }); 133 134 window.addEventListener('hashchange', function () { 135 handleAnchorNavigation(window.location.hash); 136 }); 137}); 138 139// dynamic sticky butons 140function adjustStickyBtns() { 141 const el = document.querySelector('.sticky-btns-container'); 142 143 if(!el) return; 144 145 const windowHeight = window.innerHeight; 146 const elementHeight = el.offsetHeight; 147 const defaultTop = 300; 148 const margin = 20; 149 150 let top = defaultTop; 151 152 if( top + elementHeight + margin > windowHeight) { 153 top = windowHeight - elementHeight - margin; 154 } 155 if ( top < margin ) { 156 top = margin; 157 } 158 el.style.top = `${top}px`; 159 160} 161 162window.addEventListener('resize', adjustStickyBtns); 163window.addEventListener('load', adjustStickyBtns); 164 165/* multi file upload: keep files selected across multiple "choose file" dialogs instead of overwriting */ 166document.addEventListener('DOMContentLoaded', () => { 167 document.querySelectorAll('input[type="file"][multiple]').forEach((input) => { 168 let files = []; 169 170 input.addEventListener('change', () => {
171 Array.from(input.files).forEach((file) => files.push(file)); 172 173 const dataTransfer = new DataTransfer(); 174 files.forEach((file) => dataTransfer.items.add(file)); 175 input.files = dataTransfer.files; 176 }); 177 }); 178});
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.