main #8

Closed
limepotato wants to merge 183 commits from main into blog-drafts
5 changed files with 14 additions and 12 deletions
Showing only changes of commit 609ab1a60d - Show all commits

View file

@ -1,21 +1,22 @@
function onload() { function onload() {
if (!localStorage.getItem('chromeAccepted')) { if (!localStorage.getItem('disclaimerAccepted')) {
redirect() redirect()
} }
else {
return
}
} }
acceptDisclaimer() { function acceptDisclaimer() {
sessionStorage.removeItem( 'chromeAccepted');
console.debug(sessionStorage.getItem('disclaimerAccepted'))
} }
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
); );
const disclaimer = `<div class="web-disclaimer">`; if (chromium && screen.width >= 699) {
if (chromium && screen.width >= 699) window.location.replace("/bsod"); 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

@ -25,5 +25,6 @@ const { title } = Astro.props;
</section> </section>
<Footer /> <Footer />
<NochromeScripts /> <NochromeScripts />
<script type="text/javascript">localStorage.setItem('disclaimerAccepted', 1);</script>
</body> </body>
</html> </html>

View file

@ -7,7 +7,7 @@ import Head from "../../components/fuckchrome/bsod-head.astro";
<head> <head>
<Head /> <Head />
</head> </head>
<body onload="onload()" id="body"> <body id="body">
<slot /> <slot />
</body> </body>
</html> </html>

View file

@ -14,7 +14,7 @@ import Layout from "../layouts/fuckchrome/bsod.astro";
</div> </div>
<div class="error-text"> <div class="error-text">
<br> <br>
<p>For more information about this issue and possible fixes, and to never be redirected again, visit <a href="/nochrome" style="color=#ffffff;" onclick="acceptDisclaimer()">https://nelle.observer/nochrome</a></p> <p>For more information about this issue and possible fixes, and to never be redirected again, visit <a href="/nochrome" style="color=#ffffff;">https://nelle.observer/nochrome</a></p>
<p>If you contact me about this, please give me this error:</p> <p>If you contact me about this, please give me this error:</p>
<p>Stop Code: EW_CHROME_YUCK</p> <p>Stop Code: EW_CHROME_YUCK</p>
</div> </div>

View file

@ -8,6 +8,6 @@ import Layout from "../layouts/fuckchrome/mobile-warn.astro";
<p>The website on <span style="font-weight: bold;">nelle.observer</span> is scared of chromium-based browsers, which yours seems to be of.</p> <p>The website on <span style="font-weight: bold;">nelle.observer</span> is scared of chromium-based browsers, which yours seems to be of.</p>
<p style="font-size: smaller;">NET::EW_CHROME_YUCK</p> <p style="font-size: smaller;">NET::EW_CHROME_YUCK</p>
<br> <br>
<a href="/nochrome" onclick="acceptDisclaimer()">Proceed to information (unsafe) and to never be redirected again</a> <a href="/nochrome">Proceed to information (unsafe) and to never be redirected again</a>
</main> </main>
</Layout> </Layout>