nevim
This commit is contained in:
parent
51b98dd39e
commit
af9e6a6376
@ -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,10 +25,10 @@
|
|||||||
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
|
||||||
});
|
});
|
||||||
console.log('Message sent successfully.')
|
console.log('Message sent successfully.')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error:', error)
|
console.error('Error:', error)
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user