Taxonova / webapp /static /theme.js
claessonlab's picture
New web app: composition plots, count tables, downloads; taxonova 26.10.1
b018397 verified
Raw History Blame Contribute Delete
320 Bytes
// Apply a saved colour theme before the page paints. "auto" follows the system.
(function () {
try {
var t = localStorage.getItem("taxonova-theme");
if (t === "light" || t === "dark") document.documentElement.setAttribute("data-theme", t);
} catch (e) { /* storage unavailable: follow the system */ }
})();