whatever it works i guess
This commit is contained in:
parent
5d4183c0a0
commit
41b2e51daa
2 changed files with 27 additions and 25 deletions
|
@ -1,30 +1,20 @@
|
|||
function onload() {
|
||||
if (sessionStorage.getItem('sgaEnabled')) {
|
||||
enableSGA()
|
||||
}
|
||||
else {
|
||||
disableSGA()
|
||||
}
|
||||
}
|
||||
|
||||
function enableSGA() {
|
||||
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
|
||||
document.getElementById("body").style.fontWeight = "lighter";
|
||||
sessionStorage.setItem( 'sgaEnabled', 1);
|
||||
console.debug(sessionStorage.getItem('sgaEnabled'))
|
||||
sessionStorage.setItem("sgaEnabled", 1);
|
||||
console.debug(sessionStorage.getItem("sgaEnabled"));
|
||||
}
|
||||
|
||||
function disableSGA() {
|
||||
document.getElementById("body").style.fontFamily = "terminess-nf, system-ui";
|
||||
sessionStorage.removeItem( 'sgaEnabled');
|
||||
console.debug(sessionStorage.getItem('sgaEnabled'))
|
||||
sessionStorage.removeItem("sgaEnabled");
|
||||
console.debug(sessionStorage.getItem("sgaEnabled"));
|
||||
}
|
||||
|
||||
function toggleTheme() {
|
||||
if (!sessionStorage.getItem('sgaEnabled')) {
|
||||
enableSGA()
|
||||
}
|
||||
else {
|
||||
disableSGA()
|
||||
if (!sessionStorage.getItem("sgaEnabled")) {
|
||||
enableSGA();
|
||||
} else {
|
||||
disableSGA();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ const { title } = Astro.props;
|
|||
<head>
|
||||
<Head title={title} />
|
||||
</head>
|
||||
<body onload="onload()" id="body">
|
||||
<body onload="test" id="body">
|
||||
<Header />
|
||||
<section class="content center">
|
||||
<h1 class="title">{title}</h1>
|
||||
|
@ -24,7 +24,19 @@ const { title } = Astro.props;
|
|||
<slot />
|
||||
<Footer />
|
||||
<NormalScripts />
|
||||
<script is:inline src="/scripts/fuckchrome.js"></script>
|
||||
<script
|
||||
is:inline
|
||||
src="/scripts/fuckchrome.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
if (sessionStorage.getItem("sgaEnabled")) {
|
||||
document.getElementById("body").style.fontFamily =
|
||||
"standardGalactic, system-ui";
|
||||
document.getElementById("body").style.fontWeight = "lighter";
|
||||
sessionStorage.setItem("sgaEnabled", 1);
|
||||
console.debug(sessionStorage.getItem("sgaEnabled"));
|
||||
}
|
||||
</script>
|
||||
<audio
|
||||
id="clickSound"
|
||||
src="/assets/sounds/ui/zapsplat_multimedia_button_click_004_68776.mp3">
|
||||
|
|
Loading…
Reference in a new issue