1 2/*! 3 * GMK Reloaded v11.5.0 (https://www.gmk.de/) 4 * Copyright 2017-2020 André Kraus 5 * Licensed under the GPL-2.0-or-later license 6 */ 7 8/* IE polifill for Array.from */ 9if (!Array.from) { 10 Array.from = (function () { 11 var toStr = Object.prototype.toString; 12 var isCallable = function (fn) { 13 return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; 14 }; 15 var toInteger = function (value) { 16 var number = Number(value); 17 if (isNaN(number)) { return 0; } 18 if (number === 0 || !isFinite(number)) { return number; } 19 return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); 20 }; 21 var maxSafeInteger = Math.pow(2, 53) - 1; 22 var toLength = function (value) { 23 var len = toInteger(value); 24 return Math.min(Math.max(len, 0), maxSafeInteger); 25 }; 26 27 // The length property of the from method is 1. 28 return function from(arrayLike/*, mapFn, thisArg */) { 29 // 1. Let C be the this value. 30 var C = this; 31 32 // 2. Let items be ToObject(arrayLike). 33 var items = Object(arrayLike); 34 35 // 3. ReturnIfAbrupt(items). 36 if (arrayLike == null) { 37 throw new TypeError("Array.from requires an array-like object - not null or undefined"); 38 } 39 40 // 4. If mapfn is undefined, then let mapping be false. 41 var mapFn = arguments.length > 1 ? arguments[1] : void undefined; 42 var T; 43 if (typeof mapFn !== 'undefined') { 44 // 5. else 45 // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. 46 if (!isCallable(mapFn)) { 47 throw new TypeError('Array.from: when provided, the second argument must be a function'); 48 } 49 50 // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. 51 if (arguments.length > 2) { 52 T = arguments[2]; 53 } 54 } 55 56 // 10. Let lenValue be Get(items, "length"). 57 // 11. Let len be ToLength(lenValue). 58 var len = toLength(items.length); 59 60 // 13. If IsConstructor(C) is true, then 61 // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len. 62 // 14. a. Else, Let A be ArrayCreate(len). 63 var A = isCallable(C) ? Object(new C(len)) : new Array(len); 64 65 // 16. Let k be 0. 66 var k = 0; 67 // 17. Repeat, while k < len⦠(also steps a - h) 68 var kValue; 69 while (k < len) { 70 kValue = items[k]; 71 if (mapFn) { 72 A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); 73 } else { 74 A[k] = kValue; 75 } 76 k += 1; 77 } 78 // 18. Let putStatus be Put(A, "length", len, true). 79 A.length = len; 80 // 20. Return A. 81 return A; 82 }; 83 }()); 84 } 85/* End IE polifill for Array.from */ 86 87/* IE polifill for forEach() */ 88if ('NodeList' in window && !NodeList.prototype.forEach) { 89 console.info('polyfill for IE11'); 90 NodeList.prototype.forEach = function (callback, thisArg) { 91 thisArg = thisArg || window; 92 for (var i = 0; i < this.length; i++) { 93 callback.call(thisArg, this[i], i, this); 94 } 95 }; 96 } 97/* END IE polifill for forEach() */ 98 99 100/* Check if WebP is supported */ 101function WebpIsSupported(callback){ 102 // If the browser doesn't has the method createImageBitmap, you can't display webp format 103 if(!window.createImageBitmap){ 104 callback(false); 105 return; 106 } 107 108 // Base64 representation of a white point image 109 var webpdata = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA='; 110 111 // Retrieve the Image in Blob Format 112 fetch(webpdata).then(function(response){ 113 return response.blob(); 114 }).then(function(blob){ 115 // If the createImageBitmap method succeeds, return true, otherwise false 116 createImageBitmap(blob).then(function(){ 117 callback(true); 118 }, function(){ 119 callback(false); 120 }); 121 }); 122} 123WebpIsSupported(function(isSupported){ 124 if( !isSupported ){ 125 var webpList = Array.from(document.querySelectorAll('.webp')); 126 if ( Array.isArray(webpList)){ 127 webpList.forEach(function(item, index, arr){ 128 item.setAttribute('class', item.getAttribute('class').replace('webp', 'no-webp') ); 129 }); 130 } 131 } 132}); 133 134 135 136// Jobs Details toggle 137 138 139var emptyParagraphs = document.querySelectorAll('.jobcontent p'); 140emptyParagraphs.forEach(function(emptyParagraph) { 141 if(emptyParagraph.innerHTML === ' ') { 142 emptyParagraph.remove(); 143 } 144 if(emptyParagraph.innerHTML.includes('â¢')) { 145 emptyParagraph.style.marginBottom = 0; 146 } 147}) 148 149 150var allJobs = document.querySelectorAll('.jobdetails'); 151var jobTogglers = document.querySelectorAll('.jobrow .link'); 152var closeDetails = document.querySelectorAll('.closedetails'); 153var isSetToInactive = false;
154 155jobTogglers.forEach(function(jobToggler){ 156 jobToggler.addEventListener('click', () => { 157 let togglerID = jobToggler.dataset.id; 158 document.body.classList.add('noscroll') 159 document.documentElement.classList.add('noscroll') 160 allJobs.forEach(function(job) { 161 if (job.dataset.id === togglerID) { 162 job.classList.add('active') 163 164 } else { 165 job.classList.remove('active') 166 } 167 }) 168 }) 169}) 170 171 172closeDetails.forEach(function(closeDetail) { 173 closeDetail.addEventListener('click', () => { 174 allJobs.forEach(function(job) { 175 job.classList.remove('active') 176 }) 177 document.body.classList.remove('noscroll') 178 document.documentElement.classList.remove('noscroll') 179 }) 180}) 181 182 183 184// TO DO AK â SEARCH OPEN & Close 185let searchTogglerLocators = Array.from(document.querySelectorAll('.searchtoggle')); 186if (searchTogglerLocators.length > 0) { 187 searchTogglerLocators.forEach(function(searchTogglerLocator) { 188 searchTogglerLocator.addEventListener('click', () => { 189 searchToggle(); 190 }) 191 }) 192} 193 194function searchToggle() { 195 var search = document.querySelector('.searchoverlay'); 196 search.classList.toggle('active'); 197} 198 199// Hide/Show Quicklinks on Mobile 200 201let mobileIcons = document.getElementById('mobile-icons'); 202let lastScrollY = window.scrollY; 203 204if (mobileIcons) { 205 let lastScrollY = window.scrollY; 206 207 window.addEventListener('scroll', () => { 208 const currentScroll = window.scrollY; 209 210 if (currentScroll > lastScrollY) { 211 // scrolling down 212 mobileIcons.classList.add('show'); 213 } else { 214 // scrolling up 215 mobileIcons.classList.remove('show'); 216 } 217 218 lastScrollY = currentScroll; 219 }); 220} 221 222 223// // Enables toggling all submenus individually 224// var fixedIconMenu = document.querySelectorAll('.mobile-icons li'); 225// for(var i in fixedIconMenu) { 226// if(fixedIconMenu.hasOwnProperty(i)) { 227// fixedIconMenu[i].onclick = function() { 228// this.classList.toggle("active"); // facepalm of obviousness 229// }; 230// } 231// } 232 233/* <!-- Matomo --> */ 234/* Special Tracking */ 235if ( typeof _paq !== 'undefined' ){ 236 var linksOnThisPage = document.querySelectorAll('a'); // get all links 237 var currentDomain = document.location.origin; // get current domain 238 239 // every link get his listeners 240 linksOnThisPage.forEach(function(item, index, arr){ 241 if ( item.href.indexOf('tel:') > -1){ // item is a phone link 242 item.addEventListener("click", function(){ 243 _paq.push(['trackEvent', 244 'Kontaktaufnahme', // eventCategory 245 'Telefon Link Klick', // eventAction 246 'Telefonnummer ' + item.href.substring(4) + ' angerufen, Seite: ' + document.title // eventLabel 247 ]); 248 }); 249 } 250 if ( item.href.indexOf('mailto:') > -1){ // item is an e-mail link 251 item.addEventListener("click", function(){ 252 _paq.push(['trackEvent', 253 'Kontaktaufnahme', // eventCategory 254 'E-Mail Link Klick', // eventAction 255 'E-Mail an ' + item.href.substring(7) + ' gesendet, Seite: ' + document.title // eventLabel 256 ]); 257 }); 258 } 259 260 // CTA link texts or text fragments toLowerCase, that shoes interest on click 261 var interestSignalTexts = ['anfordern', 'finden', 'sichern', 'kontakt', 'jetzt buchen', 'online ansehen', 'konfigurator', 'bestellen', 'erfahren', 'kontakt', 'anfragen']; 262 263 if (item.href.indexOf(currentDomain) > -1 || item.href.charAt(0) === '#') { 264 let addToInterestSignals = true;
265 interestSignalTexts.forEach( signalText => { 266 if (item.text.toLowerCase().includes(signalText) && addToInterestSignals) { 267 item.addEventListener("click", function () { 268 _paq.push(['trackEvent', 269 'Signal für Interesse', // eventCategory 270 'Mehr Infos Klick', // eventAction 271 'Klick auf "' + item.text] // eventLabel 272 ); 273 }); 274 addToInterestSignals = false; 275 } 276 }); 277 } 278 }); 279 280 var contactFormsOnThisPage = document.querySelectorAll('form'); // get all forms 281 contactFormsOnThisPage.forEach(function(item, index, arr){ 282 // check for contact forms 283 if (item.id !== 'tx_indexedsearch' && item.id !== 'tx_indexedsearch_header'){ 284 item.addEventListener('submit', function(){ 285 _paq.push(['trackEvent', 286 'Kontaktaufnahme', // eventCategory 287 'Formular gesendet', // eventAction 288 'Formular gesendet auf Seite: ' + document.title // eventLabel 289 ]); 290 }); 291 } 292 }); 293 294 // Site Search Tracking 295 if(document.getElementById('tx-indexedsearch-searchbox-sword') !== null && document.getElementById('tx-indexedsearch-searchbox-sword') !== undefined 296 && document.getElementById('tx-indexedsearch-searchbox-sword').value.length > 0){ 297 298 // reduce multiple tracking: 299 // -> Track only if it is the first page of the search results || OR || there is no pagination 300 // though behind: if someone is browsing through the pagination, there are for every pageview a new site search event. 301 if ( ( document.querySelectorAll('ul.tx-indexedsearch-browsebox')[0] !== undefined && document.querySelectorAll('ul.tx-indexedsearch-browsebox li')[0].querySelectorAll('strong') !== undefined ) 302 || document.querySelectorAll('ul.tx-indexedsearch-browsebox')[0] === undefined 303 ) 304 { 305 var searchResultsCount = 0; 306 if(document.querySelectorAll('p.numberOfResultsCount strong')[1] !== undefined){ 307 searchResultsCount = parseInt(document.querySelectorAll('p.numberOfResultsCount strong')[1].innerText); 308 } 309 _paq.push(['trackSiteSearch', 310 // Search keyword searched for 311 '' + document.getElementById('tx-indexedsearch-searchbox-sword').value, 312 // Search category selected in your search engine. If you do not need this, set to false 313 "Standard", 314 // Number of results on the Search results page. Zero indicates a 'No Result Search Keyword'. Set to false if you don't know 315 searchResultsCount 316 ]); 317 318 } 319 320 }// END Site Search Tracking 321 322 // Error Page Tracking 323 if (document.title.indexOf('404') > -1 ){ 324 var errorMsg = 'Fehlerseite gefunden: ' + document.location.href; 325 if (document.referrer) errorMsg = errorMsg + ' | Besuch kam von: ' + document.referrer; 326 else errorMsg = errorMsg + ' | Quelle unbekannt bzw. direkter Aufruf'; 327 _paq.push(['trackEvent', 328 'Fehlerseite', // eventCategory 329 'Fehlerseite gefunden', // eventAction 330 errorMsg // eventLabel 331 ]); 332 } 333} 334/* <!-- End Matomo Code --> */
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.