1// show/hide navi 2let naviDialog = document.getElementById("navi-mobile"); 3document.getElementById("navi-show").addEventListener("click", function(){ 4 naviDialog.setAttribute("open", true); 5}); 6document.getElementById("navi-close").addEventListener("click", function(){ 7 naviDialog.removeAttribute("open"); 8}); 9 10// slider 11document.querySelectorAll(".slider").forEach(item => { 12 item.dataset.slideshow = "1"; 13}); 14 15document.querySelectorAll("[data-slideshow='1'").forEach(item => { 16 slideshow(item); 17}); 18 19// events filter 20document.querySelectorAll("#filter-form select.submit").forEach(item => { 21 item.addEventListener("change", function(){ 22 this.closest("form").submit(); 23 }); 24}); 25 26// add map hover functions 27document.querySelectorAll("article[data-id]").forEach(item => { 28 item.addEventListener("mouseover", function(){ 29 let marker = mspmap["marker"]["m" + this.dataset.id]; 30 if(marker){ 31 marker.openPopup(); 32 } 33 }); 34}); 35 36// dynamic figcaptions 37document.querySelectorAll("figcaption.copyright").forEach(item => { 38 let text = document.createElement("span"); 39 text.textContent = item.textContent; 40 let button = document.createElement("button"); 41 let bText = document.createElement("span"); 42 bText.textContent = "Copyright"; 43 bText.classList.add("visually-hidden"); 44 button.appendChild(bText); 45 button.addEventListener("click", function(){ 46 this.closest("figure").classList.toggle("cp"); 47 }); 48 49 item.textContent = ""; 50 item.appendChild(button); 51 item.appendChild(text); 52 item.classList.add("small") 53}); 54 55// switch view 56document.querySelectorAll("#switch-view button").forEach(item => { 57 item.addEventListener("click", function(){ 58 document.getElementById("overview").setAttribute("class", this.dataset.view + "-view"); 59 this.parentNode.querySelector("button.active").classList.remove("active"); 60 this.classList.add("active"); 61 if(this.dataset.view == "map" && document.getElementsByClassName("leaflet-container").length == 0) { 62 mspmap.renderMap(pageId, markerArray); 63 } 64 }); 65});
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.