1const user = window.localStorage['tg-user'] 2 ? JSON.parse(window.localStorage['tg-user']) 3 : { 4 value: { 5 theme: { 6 value: window.matchMedia('(prefers-color-scheme:dark)').matches ? 'dark' : 'light', 7 }, 8 }, 9 }; 10const prefersDarkMode = 11 window.matchMedia('(prefers-color-scheme:dark)').matches && 12 (!user || typeof user !== 'object' || user?.value?.theme?.value === 'dark'); 13if (prefersDarkMode) { 14 const html = document.getElementsByTagName('html'); 15 html[0].classList.add('dark'); 16}
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.