Compare commits
2 commits
65ed6e9de4
...
dcd7428687
Author | SHA1 | Date | |
---|---|---|---|
dcd7428687 | |||
584a6d2fc9 |
2 changed files with 11 additions and 2 deletions
|
@ -5,7 +5,10 @@
|
|||
|
||||
const pages = getPages();
|
||||
|
||||
let ntfyLock = false;
|
||||
async function sendNtfyMessage() {
|
||||
if (ntfyLock) return;
|
||||
ntfyLock = true;
|
||||
const message = document.getElementById("ntfy-message").value;
|
||||
if (message.length < 15)
|
||||
return alert(
|
||||
|
@ -21,6 +24,7 @@
|
|||
},
|
||||
});
|
||||
if (resp.ok) alert(`Sent: ${message}`);
|
||||
ntfyLock = false;
|
||||
}
|
||||
|
||||
function updateNtfyCharCount(_) {
|
||||
|
@ -58,7 +62,7 @@
|
|||
alt={link.name}
|
||||
/>
|
||||
{#if link.href}
|
||||
<a href={link.href} target="_blank">
|
||||
<a href={link.href} rel="me" target="_blank">
|
||||
{link.name}: {link.username}
|
||||
</a>
|
||||
{:else}
|
||||
|
@ -404,7 +408,7 @@
|
|||
128
|
||||
</label>
|
||||
<br />
|
||||
<button on:click={sendNtfyMessage} style="margin-top: 1rem;"> Send </button>
|
||||
<button on:click={sendNtfyMessage} style="margin-top: 1rem;" disabled={ntfyLock}> Send </button>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -409,6 +409,11 @@ input[type="submit"] {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
button[disabled],
|
||||
input[type="submit"][disabled] {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0.5em;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue