1(function () { 2 3 const $formGroups = document.querySelectorAll('.form-group') 4 5 const moveLabelIfText = (input, group) => { 6 const label = group.querySelector('.form-label') 7 if ( ! label) { 8 return; 9 } 10 if (input && input.value.length > 0) { 11 label.classList.add('form-label--input') 12 } else { 13 label.classList.remove('form-label--input') 14 } 15 } 16 17 $formGroups.forEach(group => { 18 const input = group.querySelector('input') 19 const textArea = group.querySelector('textarea') 20 const itemToCheck = input || textArea; 21 22 moveLabelIfText(itemToCheck, group); 23 24 itemToCheck.addEventListener('change', (e) => { 25 moveLabelIfText(itemToCheck, group); 26 }); 27 }) 28})()
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.