`;
- if ((chromium) && (screen.width >= 699)) window.location.replace("/bsod");
- if ((chromium) && (screen.width <= 699)) window.location.replace("/mobile-warn");
- }
\ No newline at end of file
+ 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");
+}
diff --git a/astro/public/scripts/lastfm.js b/astro/public/scripts/lastfm.js
index f3e2188..09a3f51 100644
--- a/astro/public/scripts/lastfm.js
+++ b/astro/public/scripts/lastfm.js
@@ -4,6 +4,5 @@ const song = document.querySelector("#song");
fetch(url)
.then((response) => response.json())
.then((json) => {
- song.innerHTML =
- `${json.track.name} - ${json.track.artist["#text"]}`;
+ song.innerHTML = `${json.track.name} - ${json.track.artist["#text"]}`;
});
diff --git a/astro/public/scripts/ntfy.js b/astro/public/scripts/ntfy.js
index d4cde06..81bad13 100644
--- a/astro/public/scripts/ntfy.js
+++ b/astro/public/scripts/ntfy.js
@@ -16,25 +16,18 @@ function sendNotification() {
}
async function ntfyClick() {
- if (ntfyInput.value.length >= 0) {
+ if (!ntfyInput.value.replace(/\s/g, '').length) {
ntfyButton.innerHTML = "
ಠ﹏ಠ";
- setTimeout(()=> {
+ setTimeout(() => {
ntfyButton.innerHTML = "
Send";
return;
- }, 1000);
+ }, 1000);
}
- if (ntfyInput.value === ' ') {
- ntfyButton.innerHTML = "
ಠ﹏ಠ";
- setTimeout(()=> {
- ntfyButton.innerHTML = "
Send";
- return;
- }, 1000);
- }
- if (ntfyInput.value.length >= 1 && ntfyInput.value !== " ") {
+ else {
ntfyButton.innerHTML = "
Sent! ( ꈍᴗꈍ)";
sendNotification();
- setTimeout(()=> {
+ setTimeout(() => {
ntfyButton.innerHTML = "
Send";
- }, 1000);
+ }, 1000);
}
}
diff --git a/astro/src/components/main-page/silly-widgets.astro b/astro/src/components/main-page/silly-widgets.astro
index 6f9e9e3..85d46f1 100644
--- a/astro/src/components/main-page/silly-widgets.astro
+++ b/astro/src/components/main-page/silly-widgets.astro
@@ -1,8 +1,7 @@