main #8
2 changed files with 10 additions and 9 deletions
|
@ -49,19 +49,20 @@ function getPlaceholder() {
|
|||
function send(message, title, attachment, click) {
|
||||
const r = new XMLHttpRequest();
|
||||
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("Attach", attachment);
|
||||
r.setRequestHeader("Click", click);
|
||||
r.setRequestHeader("Click", click);*/
|
||||
r.send(message);
|
||||
}
|
||||
|
||||
// send notification
|
||||
function sendNotification() {
|
||||
function sendNotification() {/*
|
||||
send(ntfyTitle.value, ntfyMessage.value, ntfyAttach.value, ntfyClickAction.value);
|
||||
ntfyTitle.value = "";
|
||||
ntfyAttach.value = "";
|
||||
ntfyClickAction.value = "";
|
||||
ntfyClickAction.value = "";*/
|
||||
send(ntfyMessage.value);
|
||||
ntfyMessage.value = "";
|
||||
}
|
||||
|
||||
|
@ -86,7 +87,7 @@ function toggleTitle() {
|
|||
if (ntfyTitle.style.display === "none") {
|
||||
ntfyTitle.style.display = "internal"
|
||||
}
|
||||
else {
|
||||
if (ntfyTitle.style.display === "internal") {
|
||||
ntfyTitle.style.display = "none"
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +96,7 @@ function toggleAttach() {
|
|||
if (ntfyAttach.style.display === "none") {
|
||||
ntfyAttach.style.display = "internal"
|
||||
}
|
||||
else {
|
||||
if (ntfyAttach.style.display === "internal") {
|
||||
ntfyAttach.style.display = "none"
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +105,7 @@ function toggleClick() {
|
|||
if (ntfyClickAction.style.display === "none") {
|
||||
ntfyClickAction.style.display = "internal"
|
||||
}
|
||||
else {
|
||||
ntfyClickAction.style.display = "none"
|
||||
if (ntfyAttach.style.display === "internal") {
|
||||
ntfyAttach.style.display = "none"
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
</small>
|
||||
<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>
|
||||
<input type="checkbox" id="title" name="title" onchange="toggleTitle()" />
|
||||
<label for="title">Add Title?</label>
|
||||
|
|
Loading…
Reference in a new issue