1document.addEventListener('DOMContentLoaded',()=>{const customIcons=document.querySelectorAll('span.custom-icon');const iconMap=new Map();customIcons.forEach(span=>{const name=span.dataset.name;iconMap.set(name,span.innerHTML)});const copyImgAttributesToSvg=(img,svg)=>{img.classList.forEach(cls=>{if(!svg.classList.contains(cls)){svg.classList.add(cls)}});svg.classList.add('replaced-icon');Array.from(img.attributes).forEach(attr=>{if(attr.name==='src'){return} 2if(!svg.hasAttribute(attr.name)){svg.setAttribute(attr.name,attr.value)}});const alt=img.getAttribute('alt');const titleAttr=img.getAttribute('title');const tooltipText=titleAttr||alt;if(tooltipText){let svgTitle=svg.querySelector('title');if(!svgTitle){svgTitle=document.createElementNS('http://www.w3.org/2000/svg','title');if(svg.firstChild){svg.insertBefore(svgTitle,svg.firstChild)}else{svg.appendChild(svgTitle)}} 3svgTitle.textContent=tooltipText;if(!svg.hasAttribute('aria-label')){svg.setAttribute('role',svg.getAttribute('role')||'img');svg.setAttribute('aria-label',tooltipText)}}};const applyCustomIcons=(root=document)=>{const icons=root.querySelectorAll('img.icon');icons.forEach(img=>{if(img.dataset.customIconReplaced==='1'){const next=img.nextElementSibling;if(next&&next.classList.contains('replaced-icon')){img.style.display='none'} 4return} 5const src=img.getAttribute('src')||'';const match=src.match(/\/i\/([^\/.]+)(?:\.svg)?$/);if(match){const iconName=match[1];if(iconMap.has(iconName)){const wrapper=document.createElement('span');wrapper.innerHTML=iconMap.get(iconName);const svg=wrapper.firstElementChild;if(svg){copyImgAttributesToSvg(img,svg);img.dataset.customIconReplaced='1';img.style.display='none';img.insertAdjacentElement('afterend',svg)}}}})};applyCustomIcons(document);const observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.type==='childList'){mutation.addedNodes.forEach(node=>{if(node.nodeType===Node.ELEMENT_NODE){const el=(node);if(el.matches&&el.matches('img.icon')){const next=el.nextElementSibling;if(next&&next.classList.contains('replaced-icon')){next.remove();el.style.display='';delete el.dataset.customIconReplaced} 6applyCustomIcons(el.parentNode||document)}else{applyCustomIcons(el)}}})}else if(mutation.type==='attributes'){const target=mutation.target;if(target instanceof Element&&target.matches('img.icon')){const img=target;const next=img.nextElementSibling;if(next&&next.classList.contains('replaced-icon')){next.remove()} 7img.style.display='';delete img.dataset.customIconReplaced;applyCustomIcons(img.parentNode||document)}}})});observer.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:['src']})})
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.