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

25 lines
532 B
JavaScript

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