no only white spacesss
This commit is contained in:
parent
06ae304815
commit
c88217af10
4 changed files with 19 additions and 27 deletions
|
@ -1,12 +1,12 @@
|
||||||
function onload() {
|
function onload() {
|
||||||
redirect()
|
redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirect() {
|
function redirect() {
|
||||||
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
|
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
|
||||||
navigator.userAgent
|
navigator.userAgent
|
||||||
);
|
);
|
||||||
const disclaimer = `<div class="web-disclaimer">`;
|
const disclaimer = `<div class="web-disclaimer">`;
|
||||||
if ((chromium) && (screen.width >= 699)) window.location.replace("/bsod");
|
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("/mobile-warn");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,5 @@ const song = document.querySelector("#song");
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((json) => {
|
.then((json) => {
|
||||||
song.innerHTML =
|
song.innerHTML = `${json.track.name} - ${json.track.artist["#text"]}`;
|
||||||
`${json.track.name} - ${json.track.artist["#text"]}`;
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,25 +16,18 @@ function sendNotification() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function ntfyClick() {
|
async function ntfyClick() {
|
||||||
if (ntfyInput.value.length >= 0) {
|
if (!ntfyInput.value.replace(/\s/g, '').length) {
|
||||||
ntfyButton.innerHTML = "<span>ಠ﹏ಠ</span>";
|
ntfyButton.innerHTML = "<span>ಠ﹏ಠ</span>";
|
||||||
setTimeout(()=> {
|
setTimeout(() => {
|
||||||
ntfyButton.innerHTML = "<span>Send</span>";
|
ntfyButton.innerHTML = "<span>Send</span>";
|
||||||
return;
|
return;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
if (ntfyInput.value === ' ') {
|
else {
|
||||||
ntfyButton.innerHTML = "<span>ಠ﹏ಠ</span>";
|
|
||||||
setTimeout(()=> {
|
|
||||||
ntfyButton.innerHTML = "<span>Send</span>";
|
|
||||||
return;
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
if (ntfyInput.value.length >= 1 && ntfyInput.value !== " ") {
|
|
||||||
ntfyButton.innerHTML = "<span>Sent! ( ꈍᴗꈍ)</span>";
|
ntfyButton.innerHTML = "<span>Sent! ( ꈍᴗꈍ)</span>";
|
||||||
sendNotification();
|
sendNotification();
|
||||||
setTimeout(()=> {
|
setTimeout(() => {
|
||||||
ntfyButton.innerHTML = "<span>Send</span>";
|
ntfyButton.innerHTML = "<span>Send</span>";
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<section class="content center">
|
<section class="content center">
|
||||||
<div id="lastfm-widget">
|
<div id="lastfm-widget">
|
||||||
<div id="widget">
|
<div id="widget">
|
||||||
<a href="https://www.last.fm/user/LimePotato"
|
<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>
|
||||||
><span style="color: var(--alt-accent-600);"><i class="nf nf-md-music"></i></span> - <span id="song">⌛</span></a>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span style="font-size: small;"
|
<span style="font-size: small;"
|
||||||
|
@ -21,8 +20,9 @@
|
||||||
<button
|
<button
|
||||||
class="custom-btn btn-1"
|
class="custom-btn btn-1"
|
||||||
onclick="ntfyClick()"
|
onclick="ntfyClick()"
|
||||||
id="ntfy-send"><span>Send</span></button
|
id="ntfy-send">
|
||||||
>
|
<span>Send</span>
|
||||||
|
</button>
|
||||||
</div>
|
</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>
|
<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>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue