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

21 lines
601 B
JavaScript
Raw Normal View History

2024-08-24 00:58:47 -06:00
function enableSGA() {
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
document.getElementById("body").style.fontWeight = "lighter";
2024-08-24 03:07:18 -06:00
sessionStorage.setItem("sgaEnabled", 1);
console.debug(sessionStorage.getItem("sgaEnabled"));
2024-08-24 00:58:47 -06:00
}
function disableSGA() {
2024-08-24 02:00:50 -06:00
document.getElementById("body").style.fontFamily = "terminess-nf, system-ui";
2024-08-24 03:07:18 -06:00
sessionStorage.removeItem("sgaEnabled");
console.debug(sessionStorage.getItem("sgaEnabled"));
2024-08-03 01:35:08 -06:00
}
function toggleTheme() {
2024-08-24 03:07:18 -06:00
if (!sessionStorage.getItem("sgaEnabled")) {
enableSGA();
} else {
disableSGA();
2024-08-03 01:35:08 -06:00
}
}