1 2window.onload = function () { 3 try { 4 document.querySelector(".topContainer input[name=search]").onkeyup = function (e) { 5 if (e.keyCode == 13) { 6 search(); 7 } 8 }; 9 document.querySelector(".topContainer .icon-search").onclick = function () { 10 search(); 11 }; 12 document.getElementById("noAnalytics").onclick = function () { 13 setCookieAnalytics("noAnalytics", "1", 3650); 14 }; 15 document.getElementById("noChat").onclick = function () { 16 setCookieAnalytics("noChat", "1", 3650); 17 }; 18 document.getElementById("noCookieFb").onclick = function () { 19 setCookieAnalytics("cookieconsent_status", "0", -10); 20 }; 21 22 } catch (e) { 23 } 24 25 try{ 26 (function() { 27 'use strict'; 28 29 function trackScroll() { 30 var scrolled = window.pageYOffset; 31 var coords = document.documentElement.clientHeight/2; 32 33 if (scrolled > coords) { 34 goTopBtn.classList.add('show'); 35 } 36 if (scrolled < coords) { 37 goTopBtn.classList.remove('show'); 38 } 39 } 40 41 // function backToTop() { 42 // if (window.pageYOffset > 0) { 43 // window.scrollBy(0, -80); 44 // setTimeout(backToTop, 0); 45 // } 46 // } 47 48 function backToTop() { 49 window.scrollTo({ 50 top: 0, 51 behavior: "smooth" 52 }); 53 } 54 55 var goTopBtn = document.querySelector('.back_to_top'); 56 57 window.addEventListener('scroll', trackScroll); 58 goTopBtn.addEventListener('click', backToTop); 59 })(); 60 } catch (e) { 61 } 62 63 try { 64 document.querySelector(".toggleSearchClosed").addEventListener("click", function () { 65 document.querySelector(".search_block_top").classList.toggle("active"); 66 }) 67 document.querySelector(".toggleSearchOpen").addEventListener("click", function () { 68 document.querySelector(".search_block_top").classList.toggle("active"); 69 }) 70 } catch (e) { 71 } 72 73 try { 74 document.querySelector("#cookieConsentModal .btn-primary").addEventListener("click", function () { 75 setCookieConsent("all"); 76 }) 77 78 document.querySelector("#cookieConsentModal .btn-secondary").addEventListener("click", function () { 79 setCookieConsent("selected"); 80 }) 81 } catch (e) { 82 } 83 try { 84 var expandQuote = document.querySelectorAll(".expandQuote"); 85 for(var i=0; i<expandQuote.length; i++){ 86 expandQuote[i].addEventListener("click", function (e) { 87 e.target.parentNode.parentNode.classList.add("expanded");; 88 }) 89 } 90 } catch (e) { 91 } 92 93 try { 94 document.querySelector(".submitVoucherValue").addEventListener("click", function () { 95 nanoajax.ajax({url: '/ajax/checkVoucher.php', method: 'POST', body: 'voucherCode=' + document.querySelector(".voucherCheckCode").value}, function (code, responseText, request) { 96 document.querySelector(".responseVoucherCheck").innerHTML = responseText; 97 }) 98 }) 99 } catch (e) { 100 } 101 try { 102 document.querySelector("#topSearchField").addEventListener("keyup", function (e) { 103 document.querySelector("#topSearchForm").action = "/"+document.querySelector(".searchLang").value+"/suche/"+document.querySelector("#topSearchField").value; 104 if (e.keyCode == 13) { 105 e.preventDefault; 106 window.location.href= "/"+document.querySelector(".searchLang").value+"/suche/"+document.querySelector("#topSearchField").value; 107 } 108 }) 109 } catch (e) { 110 } 111 try { 112 document.querySelector("#nav_dropdown_collapse").style.right = "-80%"; 113 document.querySelector("#nav_dropdown_collapse").style.display = "block"; 114 document.querySelector(".navbar-toggler").addEventListener("click", function () { 115 document.querySelector("#nav_dropdown_collapse").style.display = "block"; 116 if(document.querySelector("#nav_dropdown_collapse").style.right == "0px"){ 117 document.querySelector(".navbar-toggler").classList.remove("active"); 118 document.querySelector("#nav_dropdown_collapse").style.right = "-80%"; 119 }else{ 120 document.querySelector(".navbar-toggler").classList.add("active"); 121 document.querySelector("#nav_dropdown_collapse").style.right = "0px"; 122 } 123 }) 124 } catch (e) { 125 } 126 127 128 /* try { 129 var languageSwitcher = document.querySelectorAll(".languageSwitcher span"); 130 for (var i = 0; i < languageSwitcher.length; i++) { 131 languageSwitcher[i].addEventListener("click", function (e) { 132 nanoajax.ajax({url: '/ajax/switchLanguage.php', method: 'POST', body: 'languageCode=' + e.currentTarget.dataset.lang}, function (code, responseText, request) { 133 window.location.href = window.location.href; 134 }) 135 }) 136 } 137 } catch (e) { 138 }*/ 139 140 try {
141 var rows = document.querySelectorAll(".showRowDetails"); 142 for (var i = 0; i < rows.length; i++) { 143 rows[i].addEventListener("click", function (e) { 144 e.preventDefault(); 145 if (e.currentTarget.querySelector(".rowDetails").style.display == "block") { 146 e.currentTarget.querySelector(".rowDetails").style.display = "none"; 147 } else { 148 e.currentTarget.querySelector(".rowDetails").style.display = "block"; 149 } 150 }); 151 } 152 } catch (e) { 153 } 154 155 try { 156 document.querySelector(".addSlingleVoucher").addEventListener("click", function (e) { 157 var originalDiv = document.querySelector(".singleVoucher").cloneNode(true); 158 document.querySelector(".voucherHolder").appendChild(originalDiv); 159 document.querySelector(".singleVoucher:last-child .buyVoucherNotice").value = ""; 160 }); 161 } catch (e) { 162 } 163 164 try { 165 var furtherDetails = document.querySelectorAll(".showRowDetails .link"); 166 for (var i = 0; i < furtherDetails.length; i++) { 167 furtherDetails[i].addEventListener("click", function (e) { 168 window.location.href = e.currentTarget.dataset.href; 169 }); 170 } 171 } catch (e) { 172 } 173 174 var expandables = document.querySelectorAll("h2.expandable"); 175 for (i = 0; i < expandables.length; i++) { 176 expandables[i].onclick = function (e) { 177 if (e.target.parentNode.querySelector("div.expandable").style.display == "block") { 178 e.target.parentNode.querySelector("div.expandable").style.display = "none"; 179 } else { 180 e.target.parentNode.querySelector("div.expandable").style.display = "block"; 181 } 182 } 183 } 184 185} 186 187function setCookieConsent(cookies) { 188 setCookie("cookieDone", "1") 189 if (cookies == "all" || document.querySelector(".cookieStats").prop("checked")) { 190 setCookie("cookieStats", "1") 191 } 192 if (cookies == "all" || document.querySelector(".cookiePersonal").prop("checked")) { 193 setCookie("cookiePersonal", "1", "/", 365) 194 } 195} 196 197function setCookie(cname, val, path, days) { 198 if (typeof path == "undefined") { 199 path = "/"; 200 } 201 if (typeof days == "undefined") { 202 days = 365; 203 } 204 var now = new Date(); 205 var time = now.getTime(); 206 time += 86400 * days * 1000; 207 now.setTime(time); 208 var domain = window.location.href.split("/"); 209 domain = domain[2]; 210 document.cookie = cname + '=' + val + ";path=" + path + "; expires=" + now.toUTCString() + ";path=/;domain=" + domain; 211 212} 213 214function search() { 215 window.location.href = "/suche/" + document.querySelector(".topContainer input[name=search]").value; 216} 217 218function setCookieAnalytics(name, value, days) { 219 var expires = ""; 220 if (days) { 221 var date = new Date(); 222 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 223 expires = "; expires=" + date.toUTCString(); 224 } 225 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 226 if (name == "noAnalytics") { 227 alert("Google Analytics wird auf Ihrem Computer, solange Sie Ihre Cookies nicht löschen, in den nächsten 10 Jahren nicht mehr eingebunden.") 228 } 229 if (name == "cookieconsent_status") { 230 alert("Ihre Zustimmung wurde rückgängig gemacht.") 231 } 232 if (name == "noChat") { 233 alert("Der Chat ist deaktiviert, sobald Sie unsere Seite neu laden.") 234 } 235} 236function getCookie(name) { 237 var value = "; " + document.cookie; 238 var parts = value.split("; " + name + "="); 239 if (parts.length == 2) return parts.pop().split(";").shift(); 240} 241 242 243// https://github.com/yanatan16/nanoajax 244!function (t, e) { 245 function n(t) { 246 return t && e.XDomainRequest && !/MSIE 1/.test(navigator.userAgent) ? new XDomainRequest : e.XMLHttpRequest ? new XMLHttpRequest : void 0 247 } 248 249 function o(t, e, n) { 250 t[e] = t[e] || n 251 } 252 253 var r = ["responseType", "withCredentials", "timeout", "onprogress"]; 254 t.ajax = function (t, a) { 255 function s(t, e) { 256 return function () { 257 c || (a(void 0 === f.status ? t : f.status, 0 === f.status ? "Error" : f.response || f.responseText || e, f), c = !0) 258 } 259 } 260 261 var u = t.headers || {}, i = t.body, d = t.method || (i ? "POST" : "GET"), c = !1, f = n(t.cors); 262 f.open(d, t.url, !0); 263 var l = f.onload = s(200); 264 f.onreadystatechange = function () { 265 4 === f.readyState && l() 266 }, f.onerror = s(null, "Error"), f.ontimeout = s(null, "Timeout"), f.onabort = s(null, "Abort"), i && (o(u, "X-Requested-With", "XMLHttpRequest"), e.FormData && i instanceof e.FormData || o(u, "Content-Type", "application/x-www-form-urlencoded")); 267 for (var p, m = 0, v = r.length; v > m; m++)p = r[m], void 0 !== t[p] && (f[p] = t[p]); 268 for (var p in u)f.setRequestHeader(p, u[p]); 269 return f.send(i), f 270 }, e.nanoajax = t 271}({}, function () { 272 return this 273}()); 274 275function AddOnloadEvent(f) { 276 if (typeof window.onload != 'function') { 277 window.onload = f; 278 } 279 else { 280 var cache = window.onload; 281 window.onload = function () { 282 if (cache) { 283 cache(); 284 } 285 }; 286 } 287} 288 289 290
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.