nelle-observer/astro/public/scripts/sga.js
2024-08-24 01:05:18 -06:00

28 lines
765 B
JavaScript

function onload() {
}
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'))
}
function toggleTheme() {
// Obtains an array of all <link>
// elements.
// Select your element using indexing.
if (document.getElementById("body").style.fontFamily !== "standardGalactic, system-ui") {
enableSGA()
}
else {
disableSGA()
}
}