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",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"command": "./node_modules/.bin/astro dev --host",
"name": "Development server",
"request": "launch",
"type": "node-terminal"

View file

@ -1,17 +1,13 @@
function onload() {
if (!localStorage.getItem('disclaimerAccepted')) {
redirect()
}
}
function redirect() {
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
navigator.userAgent
);
if (chromium && screen.width >= 699) {
window.location.replace("/bsod");
if (!localStorage.getItem('disclaimerAccepted')) {
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 title={title} />
</head>
<body onload="onload()" id="body">
<body onload="onload(), redirect()" id="body">
<Header />
<section class="content center">
<h1 class="title">{title}</h1>
@ -24,10 +24,7 @@ const { title } = Astro.props;
<slot />
<Footer />
<NormalScripts />
<script
is:inline
src="/scripts/fuckchrome.js"
></script>
<script is:inline src="/scripts/fuckchrome.js"></script>
<script is:inline src="/scripts/sga.js"></script>
<audio
id="clickSound"