main #8

Closed
limepotato wants to merge 183 commits from main into blog-drafts
Showing only changes of commit 81f9a4b592 - Show all commits

View file

@ -1,17 +1,22 @@
function onload() {
if (localStorage.getItem('sgaEnabled')) {
enableSGA()
}
else {
disableSGA()
}
}
function enableSGA() {
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
document.getElementById("body").style.fontWeight = "lighter";
localStorage.setItem( 'sgaEnabled', true );
localStorage.setItem( 'sgaEnabled', 1);
console.debug(localStorage.getItem('sgaEnabled'))
}
function disableSGA() {
document.getElementById("body").style.fontFamily = " terminess-nf, system-ui";
localStorage.setItem( 'sgaEnabled', false );
document.getElementById("body").style.fontFamily = "terminess-nf, system-ui";
localStorage.removeItem( 'sgaEnabled');
console.debug(localStorage.getItem('sgaEnabled'))
}
@ -19,10 +24,10 @@ function toggleTheme() {
// Obtains an array of all <link>
// elements.
// Select your element using indexing.
if (document.getElementById("body").style.fontFamily !== "standardGalactic, system-ui") {
if (!localStorage.getItem('sgaEnabled')) {
enableSGA()
}
else {
else {
disableSGA()
}
}