1document.addEventListener( 'DOMContentLoaded', () => { 2 const buttons = document.querySelectorAll( 'button.simpletoc-collapsible' ); 3 4 buttons.forEach( ( button ) => { 5 button.addEventListener( 'click', () => { 6 button.classList.toggle( 'active' ); 7 const content = button.parentElement.nextElementSibling; 8 const isCollapsed = 9 ! content.style.maxHeight || content.style.maxHeight === '0px'; 10 11 button.setAttribute( 12 'aria-expanded', 13 isCollapsed ? 'true' : 'false' 14 ); 15 content.style.maxHeight = isCollapsed 16 ? `${ content.scrollHeight }px` 17 : '0px'; 18 } ); 19 } ); 20} );
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.