1var isLoggedIn = document.body.classList.contains("bodyLoggedIn"); 2var isEditMode = document.body.classList.contains("editMode"); 3 4var root = document.documentElement; 5var scrollToTopElements = document.querySelectorAll("[data-scrolltotop]"); 6 7// SITE LOAD 8document.addEventListener("DOMContentLoaded", function() { 9 // if site is already scrolled on page load, add class 10 if (window.scrollY >= 1) { 11 scrollToTopElements.forEach(elem => { 12 elem.classList.add("scrolled"); 13 }); 14 } 15}); 16 17// SCROLL 18window.addEventListener("scroll", function() { 19 if (window.scrollY >= 1) { 20 scrollToTopElements.forEach(elem => { 21 elem.classList.add("scrolled"); 22 }); 23 } else { 24 scrollToTopElements.forEach(elem => { 25 elem.classList.remove("scrolled"); 26 }); 27 } 28}) 29 30// ADD WINDOW HEIGHT VARIABLE 31var windowHeightEvents = ["load", "resize", "orientationchange"] 32windowHeightEvents.forEach((event) => { 33 window.addEventListener(event, function(e) { 34 root.style.setProperty('--window-height', window.innerHeight + "px"); 35 }); 36}) 37 38// MENU TOGGLES ON MOBILE 39var menuSpanClickElements = document.querySelectorAll(".nav-item > span.menuSpanClick"); 40menuSpanClickElements.forEach((elem) => { 41 elem.addEventListener("click", function (event) { 42 menuSpanClickElements.forEach((e) => 43 e === event.target && !e.parentNode.classList.contains("show") 44 ? e.parentNode.classList.add("show") 45 : e.parentNode.classList.remove("show") 46 ); 47 }); 48}); 49 50// ADD SHOW ICON TO EVERY ACTIVE/CURRENT MENU ITEM 51var activeCurrentNavItems = document.querySelectorAll(".nav-item.l0.active, .nav-item.l0.current"); 52activeCurrentNavItems.forEach((elem) => { 53 elem.classList.add("show"); 54}); 55 56// CALL KLARO WINDOW FROM FOOTER MENU 57var footers = document.querySelectorAll("ul.footer-nav li a"); 58footers.forEach(function (item) { 59 if (item.innerHTML == "Cookies" || item.innerText == "Cookies") { 60 item.addEventListener("click", function () { 61 // force klaro window 62 return klaro.show(undefined, true); 63 }); 64 } 65}); 66 67// SCROLL-TO-TOP FUNCTION 68function scrollToTop() { 69 window.scroll({ 70 top: 0, 71 left: 0, 72 behavior: "smooth", 73 }); 74} 75 76// CLICK EVENT ON SCROLL TO TOP BUTTON 77scrollToTopElements.forEach(elem => { 78 elem.addEventListener("click", function() { 79 scrollToTop(); 80 }) 81}); 82 83// init tooltips 84const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]'); 85const tooltipList = [...tooltipTriggerList].map( 86 (tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl) 87); 88 89// init popovers 90const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]'); 91const popoverList = [...popoverTriggerList].map( 92 (popoverTriggerEl) => new bootstrap.Popover(popoverTriggerEl) 93);
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.