1window.addEventListener("load", function() { 2 closePestModal(); 3}); 4 5function closePestModal() { 6 // Get the modal 7 var modal = document.getElementById("filterSetModal"); 8 9 // Get the button that opens the modal 10 var btn = document.getElementById("filterSetBtn"); 11 12 // Get the <span> element that closes the modal 13 var span = document.getElementById("close-modal"); 14 15 if (btn) { 16 17 // When the user clicks on the button, open the modal 18 btn.onclick = function () { 19 modal.style.display = "block"; 20 } 21 22 // When the user clicks on <span> (x), close the modal 23 span.onclick = function () { 24 modal.style.display = "none"; 25 } 26 27 // When the user clicks anywhere outside of the modal, close it 28 window.onclick = function (event) { 29 var url = window.location.pathname; 30 var isPLP = url.includes("plp"); 31 var isTypeC = url.includes("c"); 32 if (event.target === modal && !(isTypeC && isPLP)) { 33 modal.style.display = "none"; 34 } 35 } 36 } 37} 38 39function dismissPestModal() { 40 var modal = document.getElementById("filterSetModal"); 41 modal.style.display = "none"; 42} 43 44function validateFilterForm() { 45 var url = window.location.pathname; 46 var isTypeC = url.includes("c"); 47 var isPLP = url.includes("plp"); 48 49 var warning = document.getElementsByClassName("form-warning")[0]; 50 51 if ( isTypeC && isPLP ) { 52 53 var service = document.forms["ZipSearchFilter"]["kwservices"].value; 54 55 if (service === "") { 56 warning.style.display = 'block'; 57 return false; 58 } 59 } 60 61 var zipcode = document.forms["ZipSearchFilter"]["zipcode"].value; 62 if (zipcode === "") { 63 warning.style.display = 'block'; 64 return false; 65 } 66}
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.