diff --git a/astro/.vscode/launch.json b/astro/.vscode/launch.json index d642209..7b9af81 100644 --- a/astro/.vscode/launch.json +++ b/astro/.vscode/launch.json @@ -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" diff --git a/astro/public/scripts/fuckchrome.js b/astro/public/scripts/fuckchrome.js index 5796141..be25683 100644 --- a/astro/public/scripts/fuckchrome.js +++ b/astro/public/scripts/fuckchrome.js @@ -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"); } } diff --git a/astro/src/layouts/Layout.astro b/astro/src/layouts/Layout.astro index 6007c6d..c1c5291 100755 --- a/astro/src/layouts/Layout.astro +++ b/astro/src/layouts/Layout.astro @@ -16,7 +16,7 @@ const { title } = Astro.props;
+