no only white spacesss

This commit is contained in:
nelle 2024-08-20 19:18:23 -06:00
parent 06ae304815
commit c88217af10
4 changed files with 19 additions and 27 deletions

View file

@ -1,5 +1,5 @@
function onload() {
redirect()
redirect();
}
function redirect() {
@ -7,6 +7,6 @@ function redirect() {
navigator.userAgent
);
const disclaimer = `<div class="web-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");
}

View file

@ -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"]}`;
});

View file

@ -16,21 +16,14 @@ function sendNotification() {
}
async function ntfyClick() {
if (ntfyInput.value.length >= 0) {
if (!ntfyInput.value.replace(/\s/g, '').length) {
ntfyButton.innerHTML = "<span>ಠ﹏ಠ</span>";
setTimeout(() => {
ntfyButton.innerHTML = "<span>Send</span>";
return;
}, 1000);
}
if (ntfyInput.value === ' ') {
ntfyButton.innerHTML = "<span>ಠ﹏ಠ</span>";
setTimeout(()=> {
ntfyButton.innerHTML = "<span>Send</span>";
return;
}, 1000);
}
if (ntfyInput.value.length >= 1 && ntfyInput.value !== " ") {
else {
ntfyButton.innerHTML = "<span>Sent! ( ꈍᴗꈍ)</span>";
sendNotification();
setTimeout(() => {

View file

@ -1,8 +1,7 @@
<section class="content center">
<div id="lastfm-widget">
<div id="widget">
<a href="https://www.last.fm/user/LimePotato"
><span style="color: var(--alt-accent-600);"><i class="nf nf-md-music"></i></span> - <span id="song">&#8987</span></a>
<a href="https://www.last.fm/user/LimePotato"><span style="color: var(--alt-accent-600);"><i class="nf nf-md-music"></i></span> - <span id="song">&#8987</span></a>
</div>
<div>
<span style="font-size: small;"
@ -21,8 +20,9 @@
<button
class="custom-btn btn-1"
onclick="ntfyClick()"
id="ntfy-send"><span>Send</span></button
>
id="ntfy-send">
<span>Send</span>
</button>
</div>
<small>if it doesnt seem to be working, or you have javascript disabled, <br>you can POST to <span class="glitch">https://ntfy.ouroboros.group/beep</span>.</small>
</div>