38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
// IF YOU EDIT ANYTHING IN HERE DONT FORGET TO EDIT THE SCRIPT IN LAYOUT.ASTRO BECAUSE FUCK ME
|
|
function onload() {
|
|
if (sessionStorage.getItem("sgaEnabled")) {
|
|
enableSGA();
|
|
}
|
|
}
|
|
|
|
/*
|
|
// IF YOU EDIT ANYTHING IN HERE DONT FORGET TO EDIT THE SCRIPT IN SGA.JS BECAUSE FUCK ME
|
|
if (sessionStorage.getItem("sgaEnabled")) {
|
|
document.getElementById("body").style.fontFamily =
|
|
"standardGalactic, system-ui";
|
|
sessionStorage.setItem("sgaEnabled", 1);
|
|
console.debug(sessionStorage.getItem("sgaEnabled"));
|
|
}
|
|
*/
|
|
|
|
function enableSGA() {
|
|
document.getElementById("body").style.fontFamily =
|
|
"standardGalactic, system-ui";
|
|
sessionStorage.setItem("sgaEnabled", 1);
|
|
console.debug(sessionStorage.getItem("sgaEnabled"));
|
|
}
|
|
|
|
function disableSGA() {
|
|
document.getElementById("body").style.fontFamily =
|
|
"departure-mono, system-ui";
|
|
sessionStorage.removeItem("sgaEnabled");
|
|
console.debug(sessionStorage.getItem("sgaEnabled"));
|
|
}
|
|
|
|
function toggleTheme() {
|
|
if (!sessionStorage.getItem("sgaEnabled")) {
|
|
enableSGA();
|
|
} else {
|
|
disableSGA();
|
|
}
|
|
}
|