1"use strict"; 2 3 4// NodeList.prototype.forEach() polyfill 5if (window.NodeList && !NodeList.prototype.forEach) { 6 NodeList.prototype.forEach = Array.prototype.forEach; 7} 8 9//MENU TOGGLE 10window.addEventListener("DOMContentLoaded", () => { 11 const menuToggle = document.getElementById("menuToggle"); 12 const menu = document.getElementById("menu"); 13 if (menuToggle && menu) { 14 menuToggle.addEventListener('click', () => { 15 menu.classList.toggle('showMenu'); 16 }); 17 } 18}); 19//submenuToggle 20window.addEventListener("DOMContentLoaded", () => { 21 document.querySelectorAll("*[data-submenu]").forEach((elm) => { 22 const submenu = document.getElementById(elm.dataset.submenu); 23 elm.addEventListener("mouseenter", (event) => { 24 submenu.classList.add('showMenu'); 25 }); 26 elm.addEventListener("mouseleave", (event) => { 27 submenu.classList.remove('showMenu'); 28 }); 29 elm.addEventListener("click", (event) => { 30 if (submenu.classList.contains('showMenu')) { 31 submenu.classList.remove('showMenu'); 32 } else { 33 submenu.classList.add('showMenu'); 34 } 35 }); 36 }); 37}); 38//password visiblity toggle 39window.addEventListener("DOMContentLoaded", () => { 40 const passInput = document.querySelector(".form__passToggle"); 41 if (passInput) { 42 const passToggle = document.querySelector(".form__eye"); 43 passToggle.addEventListener("click", () => { 44 passToggle.classList.toggle("form__eye__close"); 45 if (passInput.getAttribute("type") === "password") { 46 passInput.setAttribute("type", "text"); 47 } else { 48 passInput.setAttribute("type", "password"); 49 } 50 }); 51 } 52});
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.