Compare commits

...

1 commit

Author SHA1 Message Date
388a756c77 agh 2024-07-27 00:01:47 -06:00
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() {
if (JSON.parse(value) !== true) localStorage.setItem("value", true);
redirect();
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() {
// Obtains an array of all <link>
// 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
const tx = document.getElementsByTagName("textarea");
for (let i = 0; i < tx.length; i++) {
tx[i].setAttribute(
"style",
"height:" + tx[i].scrollHeight + "px;overflow-y:hidden;"
"height:" + tx[i].scrollHeight + "px;overflow-y:hidden;",
);
tx[i].addEventListener("input", OnInput, false);
}
@ -50,19 +55,21 @@ function StopSound(soundobj) {
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 links = document.querySelectorAll("a");
// biome-ignore lint/complexity/noForEach: <explanation>
links.forEach(a => {
links.forEach((a) => {
a.addEventListener("click", () => {
audio.play();
})
})
});
});
// biome-ignore lint/complexity/noForEach: <explanation>
buttons.forEach(button => {
buttons.forEach((button) => {
button.addEventListener("click", () => {
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>
</ul>
<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;">
Some Recommendations
</h2>