zephyr/doc/_static/js/dark-mode-toggle-stylesheets-loader.min.js
Benjamin Cabé 7aa6222835 doc: update dark-mode-toggle to 0.16.1
Updates the minified JS resources corresponding to latest
dark-mode-toggle (0.16.1) release.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00

2 lines
No EOL
552 B
JavaScript

// @license © 2024 Google LLC. Licensed under the Apache License, Version 2.0.
(()=>{const e="dark-mode-toggle-stylesheets";const s="dark-mode-toggle";const t="light";const l="dark";let o=document.getElementById(e).textContent;let c=null;try{c=localStorage.getItem(s)}catch(e){}const a=/\(\s*prefers-color-scheme\s*:\s*light\s*\)/gi;const r=/\(\s*prefers-color-scheme\s*:\s*dark\s*\)/gi;switch(c){case t:o=o.replace(a,"$&, all").replace(r,"$& and not all");break;case l:o=o.replace(r,"$&, all").replace(a,"$& and not all");break}document.write(o)})();