whatever for now

This commit is contained in:
nelle 2024-09-03 04:50:49 -06:00
parent 50b40ad09f
commit 7d1da74ad7
2 changed files with 10 additions and 9 deletions

View file

@ -49,19 +49,20 @@ function getPlaceholder() {
function send(message, title, attachment, click) { function send(message, title, attachment, click) {
const r = new XMLHttpRequest(); const r = new XMLHttpRequest();
r.open("POST", "https://ntfy.ouroboros.group/beep", true); r.open("POST", "https://ntfy.ouroboros.group/beep", true);
r.setRequestHeader("Content-Type", "text/plain"); r.setRequestHeader("Content-Type", "text/plain");/*
r.setRequestHeader("Title", title); r.setRequestHeader("Title", title);
r.setRequestHeader("Attach", attachment); r.setRequestHeader("Attach", attachment);
r.setRequestHeader("Click", click); r.setRequestHeader("Click", click);*/
r.send(message); r.send(message);
} }
// send notification // send notification
function sendNotification() { function sendNotification() {/*
send(ntfyTitle.value, ntfyMessage.value, ntfyAttach.value, ntfyClickAction.value); send(ntfyTitle.value, ntfyMessage.value, ntfyAttach.value, ntfyClickAction.value);
ntfyTitle.value = ""; ntfyTitle.value = "";
ntfyAttach.value = ""; ntfyAttach.value = "";
ntfyClickAction.value = ""; ntfyClickAction.value = "";*/
send(ntfyMessage.value);
ntfyMessage.value = ""; ntfyMessage.value = "";
} }
@ -86,7 +87,7 @@ function toggleTitle() {
if (ntfyTitle.style.display === "none") { if (ntfyTitle.style.display === "none") {
ntfyTitle.style.display = "internal" ntfyTitle.style.display = "internal"
} }
else { if (ntfyTitle.style.display === "internal") {
ntfyTitle.style.display = "none" ntfyTitle.style.display = "none"
} }
} }
@ -95,7 +96,7 @@ function toggleAttach() {
if (ntfyAttach.style.display === "none") { if (ntfyAttach.style.display === "none") {
ntfyAttach.style.display = "internal" ntfyAttach.style.display = "internal"
} }
else { if (ntfyAttach.style.display === "internal") {
ntfyAttach.style.display = "none" ntfyAttach.style.display = "none"
} }
} }
@ -104,7 +105,7 @@ function toggleClick() {
if (ntfyClickAction.style.display === "none") { if (ntfyClickAction.style.display === "none") {
ntfyClickAction.style.display = "internal" ntfyClickAction.style.display = "internal"
} }
else { if (ntfyAttach.style.display === "internal") {
ntfyClickAction.style.display = "none" ntfyAttach.style.display = "none"
} }
} }

View file

@ -20,7 +20,7 @@
</small> </small>
<br> <br>
<br> <br>
<fieldset style="margin-left: 35%; margin-right: 35%; margin-bottom: 2%;"> <fieldset style="margin-left: 35%; margin-right: 35%; margin-bottom: 2%; display: none;">
<div> <div>
<input type="checkbox" id="title" name="title" onchange="toggleTitle()" /> <input type="checkbox" id="title" name="title" onchange="toggleTitle()" />
<label for="title">Add Title?</label> <label for="title">Add Title?</label>