1// Get the div with the class 'stan-com-hero-link' 2const heroLinkDiv = document.querySelector('.stan-com-hero-link'); 3 4// Check if the div exists 5if (heroLinkDiv) { 6 // Get all the <a> elements within the heroLinkDiv 7 const links = heroLinkDiv.querySelectorAll('a'); 8 9 // Loop through each <a> element 10 links.forEach(link => { 11 // Create a new div element 12 const wrapperDiv = document.createElement('div'); 13 14 // Add the class 'field__item' to the new div 15 wrapperDiv.classList.add('field__item'); 16 17 // Insert the new div before the current <a> element 18 link.parentNode.insertBefore(wrapperDiv, link); 19 20 // Move the <a> element into the new div 21 wrapperDiv.appendChild(link); 22 }); 23}
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.