diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 615efe4..e3122d9 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -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(_) { diff --git a/src/routes/style.css b/src/routes/style.css index 8a74f65..e3a9e04 100644 --- a/src/routes/style.css +++ b/src/routes/style.css @@ -406,6 +406,7 @@ input[type="submit"] { border-radius: var(--radius); font-weight: bold; text-transform: uppercase; + cursor: pointer; } input[type="text"] {