1const handleOnFocus = (event, node) => { 2 const searchFieldContainer = node.parentElement; 3 searchFieldContainer.classList.add("focused"); 4}; 5 6const handleOnBlur = (event, node) => { 7 const searchFieldContainer = node.parentElement; 8 searchFieldContainer.classList.remove("focused"); 9}; 10 11const handleOnInput = (event, node) => { 12 node.value.length >= 1 13 ? (node.nextElementSibling.style.display = "block") 14 : (node.nextElementSibling.style.display = "none"); 15 16 const pattern = /[^a-zA-Z0-9'" +,-]+$/g; 17 const c = event.target.selectionStart; 18 19 if (pattern.test(node.value)) { 20 event.target.value = node.value.replace(pattern, ""); 21 c--; 22 } 23 event.target.setSelectionRange(c, c); 24}; 25 26const handleOnClick = (event, node) => { 27 node.previousElementSibling.value = ""; 28 node.previousElementSibling.setAttribute("value", ""); 29 30 node.parentElement.nextElementSibling.classList.add("hide"); 31 32 node.style.display = "none"; 33 node.previousElementSibling.focus(); 34}; 35 36const handleOnKeydown = (event, node) => { 37 if (node.value.length < 3 && event.keyCode === 13) { 38 node.parentElement.nextElementSibling.classList.remove("hide"); 39 } else { 40 node.parentElement.nextElementSibling.classList.add("hide"); 41 } 42 43 if (node.value.length >= 3 && event.keyCode === 13) { 44 window.location.href = `${node.dataset.searchpath}?q=${node.value}`; 45 46 node.value = ""; 47 node.setAttribute("value", ""); 48 node.nextElementSibling.style.display = "none"; 49 } 50}; 51 52$(document).ready(function () { 53 //Get current date and time 54 var currentDate = new Date(); 55 56 //format the date as dd/mm/yyyy 57 var formatteDate = 58 currentDate.getDate() + 59 "/" + 60 (currentDate.getMonth() + 1) + 61 "/" + 62 currentDate.getFullYear(); 63 64 //format the time as hh:mm AM/PM 65 var hours = ("0" + currentDate.getHours()).slice(-2); 66 var minutes = ("0" + currentDate.getMinutes()).slice(-2); 67 var period = hours >= 12 ? "PM" : "AM"; 68 69 //adjust hours for 12 hour format 70 hours = hours % 12 || 12; 71 72 var formattedTime = hours + ":" + minutes + " " + period; 73 74 //for mobile 75 $(".thankyou-list-regular .list-item__main-value:eq(0)").html(formatteDate); 76 $(".thankyou-list-regular .list-item__main-value:eq(1)").html(formattedTime); 77 78 // for desktop 79 $(".thankyou-list-regular .list-item__main-value:eq(2)").html(formatteDate); 80 $(".thankyou-list-regular .list-item__main-value:eq(3)").html(formattedTime); 81 82 //binding click event to go back to contact us page 83 var buttonElements = document.querySelectorAll( 84 ".thankyou-list-regular > .parsys button" 85 ); 86 87 buttonElements.forEach(function (element) { 88 element.addEventListener("click", function (e) { 89 history.back(); 90 }); 91 }); 92});
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.