This commit is contained in:
Filip Rojek 2023-05-11 20:01:54 +02:00
parent 51b98dd39e
commit af9e6a6376
2 changed files with 7 additions and 8 deletions

View File

@ -16,7 +16,7 @@
<script> <script>
const submit = document.querySelector("#submit") const submit = document.querySelector("#submit")
submit.addEventListener("click", (e) => { submit.addEventListener("click", async (e) => {
e.preventDefault() e.preventDefault()
const formData = new FormData(); const formData = new FormData();
@ -25,7 +25,7 @@
formData.append('message', document.querySelector("#message").value); formData.append('message', document.querySelector("#message").value);
try { try {
fetch('/contact/send', { await fetch('/contact/send', {
method: 'POST', method: 'POST',
body: formData body: formData
}); });

View File

@ -22,13 +22,12 @@
const pgpmobile = document.querySelector("#pgpmobile") const pgpmobile = document.querySelector("#pgpmobile")
const pgpcp = (e) => { const pgpcp = (e) => {
console.log(e) console.log(e)
e.preventDefault()
navigator.clipboard.writeText("fc37b989787acf8cbce7c0c2a56a345efe321161") navigator.clipboard.writeText("fc37b989787acf8cbce7c0c2a56a345efe321161")
alert("pgp has been copied to the clipboard") alert("pgp has been copied to the clipboard")
} }
pgp.addEventListener("click", e => pgpcp) pgp.addEventListener("click", pgpcp)
pgpmobile.addEventListener("click", e => pgpcp) pgpmobile.addEventListener("click", pgpcp)
</script> </script>
</section> </section>