1/** 2 * Apply dark mode before first paint to prevent a flash of the wrong theme. 3 * 4 * External classic script (not inline): the strict CSP (`script-src 'self'`, 5 * no 'unsafe-inline') blocks inline scripts, so an inline version silently 6 * never ran. Loaded from <head> so it executes before the body renders. 7 * 8 * Reads the persisted Zustand ui-store from localStorage; falls back to the 9 * OS preference. 10 */ 11(function () { 12 try { 13 var s = JSON.parse(localStorage.getItem('cimanote-ui') || '{}'); 14 var t = (s.state && s.state.theme) || 'system'; 15 if (t === 'dark' || (t === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)) { 16 document.documentElement.classList.add('dark'); 17 } 18 } catch (e) {} 19})();
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.