no only white spacesss
This commit is contained in:
parent
06ae304815
commit
c88217af10
4 changed files with 19 additions and 27 deletions
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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"]}`;
|
||||
});
|
||||
|
|
|
@ -16,24 +16,17 @@ function sendNotification() {
|
|||
}
|
||||
|
||||
async function ntfyClick() {
|
||||
if (ntfyInput.value.length >= 0) {
|
||||
if (!ntfyInput.value.replace(/\s/g, '').length) {
|
||||
ntfyButton.innerHTML = "<span>ಠ﹏ಠ</span>";
|
||||
setTimeout(()=> {
|
||||
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(()=> {
|
||||
setTimeout(() => {
|
||||
ntfyButton.innerHTML = "<span>Send</span>";
|
||||
}, 1000);
|
||||
}
|
||||
|
|
|
@ -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">⌛</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">⌛</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>
|
||||
|
|
Loading…
Reference in a new issue