Improve ntfy
This commit is contained in:
parent
f2cfca2f1b
commit
487b026a06
2 changed files with 4 additions and 2 deletions
|
@ -5,13 +5,13 @@
|
|||
|
||||
const pages = getPages();
|
||||
|
||||
function sendNtfyMessage() {
|
||||
async function sendNtfyMessage() {
|
||||
const message = document.getElementById("ntfy-message").value;
|
||||
if (message.length < 15)
|
||||
return alert(
|
||||
`Message must be 15 to 128 characters. Current length is ${message.length}`,
|
||||
);
|
||||
fetch("https://ntfy.meow.company/pancakes", {
|
||||
var resp = await fetch("https://ntfy.meow.company/pancakes", {
|
||||
method: "POST",
|
||||
body: message,
|
||||
headers: {
|
||||
|
@ -20,6 +20,7 @@
|
|||
Tags: "black_cat",
|
||||
},
|
||||
});
|
||||
if (resp.ok) alert(`Sent: ${message}`);
|
||||
}
|
||||
|
||||
function updateNtfyCharCount(_) {
|
||||
|
|
|
@ -406,6 +406,7 @@ input[type="submit"] {
|
|||
border-radius: var(--radius);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
|
|
Loading…
Reference in a new issue