1// Dark mode switch 2var sw = document.querySelector('#color_scheme_switch'); 3var current_scheme = localStorage.getItem('color_scheme'); 4 5if (current_scheme) { 6 document.documentElement.setAttribute('data-color-scheme', current_scheme); 7 sw.checked = (current_scheme === 'dark'); 8} 9 10function changeTheme() { 11 if (sw.checked) { 12 document.documentElement.setAttribute('data-color-scheme', 'dark'); 13 localStorage.setItem('color_scheme', 'dark'); 14 } else { 15 document.documentElement.setAttribute('data-color-scheme', 'light'); 16 localStorage.setItem('color_scheme', 'light'); 17 } 18} 19 20if (sw) { 21 sw.addEventListener('change', changeTheme); 22}
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.