main #8
2 changed files with 28 additions and 6 deletions
|
@ -1,5 +1,26 @@
|
|||
function onload() {
|
||||
sdocument.getElementById("body").style.fontFamily = "terminess-nf, system-ui";
|
||||
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'))
|
||||
}
|
||||
|
||||
function toggleTheme() {
|
||||
|
@ -7,9 +28,9 @@ function toggleTheme() {
|
|||
// elements.
|
||||
// Select your element using indexing.
|
||||
if (document.getElementById("body").style.fontFamily !== "standardGalactic, system-ui") {
|
||||
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
|
||||
document.getElementById("body").style.fontWeight = "lighter";
|
||||
} else {
|
||||
document.getElementById("body").style.fontFamily = " terminess-nf, system-ui";
|
||||
disableSGA()
|
||||
}
|
||||
else {
|
||||
enableSGA()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ const { title } = Astro.props;
|
|||
<slot />
|
||||
<Footer />
|
||||
<NormalScripts />
|
||||
<script is:inline src="/scripts/fuckchrome.js"></script>
|
||||
<!--
|
||||
<script is:inline src="/scripts/fuckchrome.js"></script>-->
|
||||
<audio
|
||||
id="clickSound"
|
||||
src="/assets/sounds/ui/zapsplat_multimedia_button_click_004_68776.mp3">
|
||||
|
|
Loading…
Reference in a new issue