main #8
3 changed files with 9 additions and 16 deletions
2
astro/.vscode/launch.json
vendored
2
astro/.vscode/launch.json
vendored
|
@ -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"
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue