1document.addEventListener("DOMContentLoaded", function () { 2 3 // Apply only to Contact Form 7 forms. 4 document.querySelectorAll('.wpcf7 form select').forEach(function (select) { 5 6 // Skip if the hidden field already exists. 7 if (select.parentNode.querySelector('[name="' + select.name + '-gsc-pipe-selected-index"]')) { 8 return; 9 } 10 11 // Create a hidden input field. 12 let hiddenInput = document.createElement("input"); 13 hiddenInput.type = "hidden"; 14 hiddenInput.name = select.name + "-gsc-pipe-selected-index"; 15 hiddenInput.value = select.selectedIndex; 16 17 // Append the hidden input next to the select. 18 select.parentNode.appendChild(hiddenInput); 19 20 // Update hidden input on select change. 21 select.addEventListener("change", function () { 22 hiddenInput.value = select.selectedIndex; 23 }); 24 }); 25 26});
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.