2024-08-03 01:35:08 -06:00
|
|
|
function onload() {
|
2024-08-24 00:58:47 -06:00
|
|
|
if (!localStorage.getItem('sgaEnabled')) {
|
|
|
|
disableSGA()
|
|
|
|
}
|
|
|
|
if (localStorage.getItem('sgaEnabled', true)) {
|
|
|
|
enableSGA()
|
|
|
|
}
|
|
|
|
if (localStorage.getItem('sgaEnabled', false)) {
|
|
|
|
disableSGA();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function enableSGA() {
|
|
|
|
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
|
|
|
|
document.getElementById("body").style.fontWeight = "lighter";
|
|
|
|
localStorage.setItem( 'sgaEnabled', true );
|
|
|
|
console.debug(localStorage.getItem('sgaEnabled'))
|
|
|
|
}
|
|
|
|
|
|
|
|
function disableSGA() {
|
|
|
|
document.getElementById("body").style.fontFamily = " terminess-nf, system-ui";
|
|
|
|
localStorage.setItem( 'sgaEnabled', false );
|
|
|
|
console.debug(localStorage.getItem('sgaEnabled'))
|
2024-08-03 01:35:08 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
function toggleTheme() {
|
|
|
|
// Obtains an array of all <link>
|
|
|
|
// elements.
|
|
|
|
// Select your element using indexing.
|
|
|
|
if (document.getElementById("body").style.fontFamily !== "standardGalactic, system-ui") {
|
2024-08-24 00:58:47 -06:00
|
|
|
disableSGA()
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
enableSGA()
|
2024-08-03 01:35:08 -06:00
|
|
|
}
|
|
|
|
}
|