1/** 2 * This module is responsible for setting the proper theme attribute on the html 3 * when auto (match system) option is set in the user preferences. 4 */ 5(function () { 6 "use strict"; 7 8 var htmlElement = document.documentElement; 9 if (htmlElement?.getAttribute('data-color-mode-auto') !== null) { 10 var colorMode = htmlElement?.getAttribute('data-color-mode'); 11 var modes = ['dark', 'light']; 12 modes.forEach(function (mode) { 13 if (colorMode !== mode && window?.matchMedia?.("(prefers-color-scheme: ".concat(mode, ")")).matches) { 14 htmlElement?.setAttribute('data-color-mode', mode); 15 } 16 }); 17 } 18})();
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.