nelle-observer/frontend/public/scripts/sga.js

23 lines
488 B
JavaScript

function getSGAState() {
if (sessionStorage.getItem("sgaEnabled")) {
enableSGA();
}
}
function enableSGA() {
document.body.style.fontFamily = "standardGalactic, system-ui";
sessionStorage.setItem("sgaEnabled", 1);
}
function disableSGA() {
document.body.style.fontFamily = "departure-mono, system-ui";
sessionStorage.removeItem("sgaEnabled");
}
function toggleTheme() {
if (!sessionStorage.getItem("sgaEnabled")) {
enableSGA();
} else {
disableSGA();
}
}