From f618fa87d695cc25cfae54b75343ee20513a2081 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sat, 24 Aug 2024 02:05:51 -0600 Subject: [PATCH] lets make that session storage actually lol --- astro/public/scripts/sga.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/astro/public/scripts/sga.js b/astro/public/scripts/sga.js index ccb326f..1db686e 100644 --- a/astro/public/scripts/sga.js +++ b/astro/public/scripts/sga.js @@ -1,5 +1,5 @@ function onload() { - if (localStorage.getItem('sgaEnabled')) { + if (sessionStorage.getItem('sgaEnabled')) { enableSGA() } else { @@ -10,14 +10,14 @@ function onload() { function enableSGA() { document.getElementById("body").style.fontFamily = "standardGalactic, system-ui"; document.getElementById("body").style.fontWeight = "lighter"; - localStorage.setItem( 'sgaEnabled', 1); - console.debug(localStorage.getItem('sgaEnabled')) + sessionStorage.setItem( 'sgaEnabled', 1); + console.debug(sessionStorage.getItem('sgaEnabled')) } function disableSGA() { document.getElementById("body").style.fontFamily = "terminess-nf, system-ui"; - localStorage.removeItem( 'sgaEnabled'); - console.debug(localStorage.getItem('sgaEnabled')) + sessionStorage.removeItem( 'sgaEnabled'); + console.debug(sessionStorage.getItem('sgaEnabled')) } function toggleTheme() {