diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 8a61a44..615efe4 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -5,7 +5,24 @@ const pages = getPages(); - function updateCharCount(_) { + 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", { + method: "POST", + body: message, + headers: { + Title: "pancakes.gay", + Priority: "min", + Tags: "black_cat", + }, + }); + } + + function updateNtfyCharCount(_) { const message = document.getElementById("ntfy-message").value; const el = document.getElementById("ntfy-char-count"); @@ -354,7 +371,7 @@


- +