1(function autoCloseDetails() { 2 document.addEventListener('click', function (event) { 3 const detailsToClose = [ 4 ...document.querySelectorAll('details[data-auto-close-details][open]'), 5 ].filter((element) => { 6 const closingOn = window.innerWidth < 750 ? 'mobile' : 'desktop'; 7 return ( 8 element.getAttribute('data-auto-close-details')?.includes(closingOn) && 9 !(event.target instanceof Node && element.contains(event.target)) 10 ); 11 }); 12 13 for (const detailsElement of detailsToClose) detailsElement.removeAttribute('open'); 14 }); 15})();
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.