1function ajaxJS(formdata, url, method = 'POST', json = true, printResultTo = '', callback = function () {}) { 2 let request = new XMLHttpRequest(); 3 request.open(method, url); 4 request.addEventListener('readystatechange', function () { 5 //console.log(this.responseText); 6 if (this.readyState == 4 && this.status == 200) { 7 if (json && printResultTo != '') { 8 document.getElementById(printResultTo).setAttribute('data-result', this.responseText); 9 } else if (printResultTo != '') { 10 document.getElementById(printResultTo).innerHTML = this.responseText; 11 } 12 callback(); 13 } 14 }); 15 request.send(formdata); 16} 17 18const showHideMenuOnSmallScreens = () => { 19 let hamburgerBtn = document.querySelector('.hamburger') 20 let header = document.querySelector('header') 21 22 23 hamburgerBtn.addEventListener('click', () => { 24 if(header.classList.contains('open')) { 25 header.classList.remove('open') 26 } else { 27 header.classList.add('open') 28 } 29 }) 30} 31 32 33 34window.addEventListener("load", () => { 35 if(screen.width <= 767) { 36 showHideMenuOnSmallScreens() 37 } 38}) 39 40 41window.addEventListener("resize", () => { 42 if(screen.width <= 767) { 43 showHideMenuOnSmallScreens() 44 } 45}) 46
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.