This commit is contained in:
nelle 2024-08-24 14:51:55 -06:00
parent 5c50f824b0
commit 8a54474f87
3 changed files with 9 additions and 16 deletions

View file

@ -2,7 +2,7 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"command": "./node_modules/.bin/astro dev", "command": "./node_modules/.bin/astro dev --host",
"name": "Development server", "name": "Development server",
"request": "launch", "request": "launch",
"type": "node-terminal" "type": "node-terminal"

View file

@ -1,17 +1,13 @@
function onload() {
if (!localStorage.getItem('disclaimerAccepted')) {
redirect()
}
}
function redirect() { function redirect() {
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test( const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
navigator.userAgent navigator.userAgent
); );
if (chromium && screen.width >= 699) { if (!localStorage.getItem('disclaimerAccepted')) {
window.location.replace("/bsod"); if (chromium && screen.width >= 699) {
window.location.replace("/bsod");
}
if (chromium && screen.width <= 699) {
window.location.replace("/mobile-warn");
} }
if (chromium && screen.width <= 699) {
window.location.replace("/mobile-warn");
} }
} }

View file

@ -16,7 +16,7 @@ const { title } = Astro.props;
<head> <head>
<Head title={title} /> <Head title={title} />
</head> </head>
<body onload="onload()" id="body"> <body onload="onload(), redirect()" id="body">
<Header /> <Header />
<section class="content center"> <section class="content center">
<h1 class="title">{title}</h1> <h1 class="title">{title}</h1>
@ -24,10 +24,7 @@ const { title } = Astro.props;
<slot /> <slot />
<Footer /> <Footer />
<NormalScripts /> <NormalScripts />
<script <script is:inline src="/scripts/fuckchrome.js"></script>
is:inline
src="/scripts/fuckchrome.js"
></script>
<script is:inline src="/scripts/sga.js"></script> <script is:inline src="/scripts/sga.js"></script>
<audio <audio
id="clickSound" id="clickSound"