This commit is contained in:
nelle 2024-07-27 00:01:47 -06:00
parent 981e680db3
commit 388a756c77
5 changed files with 49 additions and 15 deletions

1
devEnv.sh Executable file
View file

@ -0,0 +1 @@
./node_modules/.bin/astro dev --host

View file

@ -0,0 +1,15 @@
function getAccepted() {
var value = localStorage.getItem("accepted");
return (value = "0");
}
function setAccepted() {
localStorage.setItem("accepted", accepted ? "0" : "1");
}
function acceptDisclaimer(disclaimer) {
if (getAccepted() == 0) setAccepted(1);
else {
setAccepted(0);
}
}

View file

@ -1,8 +1,22 @@
const value = localStorage.getItem("value");
function onload() { function onload() {
if (JSON.parse(value) !== true) localStorage.setItem("value", true);
redirect(); redirect();
sdocument.getElementById("body").style.fontFamily = "system-ui, sans-serif"; sdocument.getElementById("body").style.fontFamily = "system-ui, sans-serif";
} }
function redirect() {
let chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
navigator.userAgent,
);
//let disclaimer = `<div class="web-disclaimer">`;
if (chromium && screen.width >= 699 && getAccepted() == 0)
window.location.replace("/bsod");
if (chromium && screen.width <= 699 && getAccepted() == 0)
window.location.replace("/mobile-warn");
}
function toggleTheme() { function toggleTheme() {
// Obtains an array of all <link> // Obtains an array of all <link>
// elements. // elements.
@ -14,21 +28,12 @@ function toggleTheme() {
} }
} }
function redirect() {
let chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
navigator.userAgent
);
let disclaimer = `<div class="web-disclaimer">`;
if ((chromium) && (screen.width >= 699)) window.location.replace("/bsod");
if ((chromium) && (screen.width <= 699)) window.location.replace("/mobile-warn");
}
// Resizable textarea // Resizable textarea
const tx = document.getElementsByTagName("textarea"); const tx = document.getElementsByTagName("textarea");
for (let i = 0; i < tx.length; i++) { for (let i = 0; i < tx.length; i++) {
tx[i].setAttribute( tx[i].setAttribute(
"style", "style",
"height:" + tx[i].scrollHeight + "px;overflow-y:hidden;" "height:" + tx[i].scrollHeight + "px;overflow-y:hidden;",
); );
tx[i].addEventListener("input", OnInput, false); tx[i].addEventListener("input", OnInput, false);
} }
@ -50,19 +55,21 @@ function StopSound(soundobj) {
thissound.currentTime = 0; thissound.currentTime = 0;
} }
const audio = new Audio("/assets/sounds/ui/zapsplat_multimedia_button_click_004_68776.mp3"); const audio = new Audio(
"/assets/sounds/ui/zapsplat_multimedia_button_click_004_68776.mp3",
);
const buttons = document.querySelectorAll("button"); const buttons = document.querySelectorAll("button");
const links = document.querySelectorAll("a"); const links = document.querySelectorAll("a");
// biome-ignore lint/complexity/noForEach: <explanation> // biome-ignore lint/complexity/noForEach: <explanation>
links.forEach(a => { links.forEach((a) => {
a.addEventListener("click", () => { a.addEventListener("click", () => {
audio.play(); audio.play();
}) });
}) });
// biome-ignore lint/complexity/noForEach: <explanation> // biome-ignore lint/complexity/noForEach: <explanation>
buttons.forEach(button => { buttons.forEach((button) => {
button.addEventListener("click", () => { button.addEventListener("click", () => {
audio.play(); audio.play();
}); });

View file

@ -0,0 +1,7 @@
---
title: 'I Do Not Like Chromium'
description: 'A full dissertation on why I hate Chrome'
pubDate: 'July 10 2024'
---
## Chromium sucka and so do i

View file

@ -24,6 +24,10 @@ import Layout from "../layouts/Layout-nochrome.astro";
</li> </li>
</ul> </ul>
<hr /> <hr />
<a id="disclaimer" value="Toggle"
>Click here to avoid the redirect and view my website as normal</a
>
<hr />
<h2 class="subtitle" style="text-align: center;"> <h2 class="subtitle" style="text-align: center;">
Some Recommendations Some Recommendations
</h2> </h2>