From 609ab1a60d21a5413f1586bfbb94f94458662e62 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sat, 24 Aug 2024 02:42:43 -0600 Subject: [PATCH] oki now it worky --- astro/public/scripts/fuckchrome.js | 19 ++++++++++--------- .../layouts/fuckchrome/Layout-nochrome.astro | 1 + astro/src/layouts/fuckchrome/bsod.astro | 2 +- astro/src/pages/bsod.astro | 2 +- astro/src/pages/mobile-warn.astro | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/astro/public/scripts/fuckchrome.js b/astro/public/scripts/fuckchrome.js index 0e52906..a5850fd 100644 --- a/astro/public/scripts/fuckchrome.js +++ b/astro/public/scripts/fuckchrome.js @@ -1,21 +1,22 @@ function onload() { - if (!localStorage.getItem('chromeAccepted')) { + if (!localStorage.getItem('disclaimerAccepted')) { redirect() } - else { - return - } } -acceptDisclaimer() { - sessionStorage.removeItem( 'chromeAccepted'); +function acceptDisclaimer() { + + console.debug(sessionStorage.getItem('disclaimerAccepted')) } function redirect() { const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test( navigator.userAgent ); - const disclaimer = `
`; - 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("/bsod"); + } + if (chromium && screen.width <= 699) { + window.location.replace("/mobile-warn"); + } } diff --git a/astro/src/layouts/fuckchrome/Layout-nochrome.astro b/astro/src/layouts/fuckchrome/Layout-nochrome.astro index 2343ca7..d8c5ea1 100755 --- a/astro/src/layouts/fuckchrome/Layout-nochrome.astro +++ b/astro/src/layouts/fuckchrome/Layout-nochrome.astro @@ -25,5 +25,6 @@ const { title } = Astro.props;
+ diff --git a/astro/src/layouts/fuckchrome/bsod.astro b/astro/src/layouts/fuckchrome/bsod.astro index 96e1d98..9df1769 100755 --- a/astro/src/layouts/fuckchrome/bsod.astro +++ b/astro/src/layouts/fuckchrome/bsod.astro @@ -7,7 +7,7 @@ import Head from "../../components/fuckchrome/bsod-head.astro"; - + diff --git a/astro/src/pages/bsod.astro b/astro/src/pages/bsod.astro index 03ece89..274deab 100644 --- a/astro/src/pages/bsod.astro +++ b/astro/src/pages/bsod.astro @@ -14,7 +14,7 @@ import Layout from "../layouts/fuckchrome/bsod.astro";

-

For more information about this issue and possible fixes, and to never be redirected again, visit https://nelle.observer/nochrome

+

For more information about this issue and possible fixes, and to never be redirected again, visit https://nelle.observer/nochrome

If you contact me about this, please give me this error:

Stop Code: EW_CHROME_YUCK

diff --git a/astro/src/pages/mobile-warn.astro b/astro/src/pages/mobile-warn.astro index 9d08062..32a4eea 100644 --- a/astro/src/pages/mobile-warn.astro +++ b/astro/src/pages/mobile-warn.astro @@ -8,6 +8,6 @@ import Layout from "../layouts/fuckchrome/mobile-warn.astro";

The website on nelle.observer is scared of chromium-based browsers, which yours seems to be of.

NET::EW_CHROME_YUCK


- Proceed to information (unsafe) and to never be redirected again + Proceed to information (unsafe) and to never be redirected again