1(() => { 2 // public/js/darkMode.js 3 (() => { 4 if (!window.matchMedia) { 5 return; 6 } 7 const manifests = document.querySelectorAll('link[rel="manifest"]'); 8 const favicons = document.querySelectorAll( 9 'link[rel="icon"],link[rel=apple-touch-icon]' 10 ); 11 const maskIcons = document.querySelectorAll('link[rel="mask-icon') || []; 12 const toggleTheme = (e) => { 13 const darkModeOn = !!e.matches; 14 manifests.forEach((link) => { 15 link.href = darkModeOn ? link.dataset.hrefDark : link.dataset.hrefLight; 16 }); 17 favicons.forEach((link) => { 18 link.href = darkModeOn ? link.dataset.hrefDark : link.dataset.hrefLight; 19 }); 20 maskIcons.forEach((link) => { 21 link.color = darkModeOn ? "#ffffff" : "#000000"; 22 }); 23 }; 24 window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", toggleTheme); 25 toggleTheme(window.matchMedia("(prefers-color-scheme: dark)")); 26 })(); 27})(); 28//# sourceMappingURL=darkMode.js.map
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.