36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
---
|
|
layout: base.njk
|
|
---
|
|
<h1>email.radio</h1>
|
|
<p>email.radio is dedicated to providing free email hosting for all licensed ham radio operators. You will get a (free!) email @email.radio address.</p>
|
|
|
|
<p>A magical signup form will appear here on May 3rd, 2023.</p>
|
|
|
|
<input placeholder="Callsign" id="call" oninput="updateEmail()">
|
|
<br>
|
|
<input placeholder="Your regular email" id="email">
|
|
<p id="emailf">Your email will be</p>
|
|
<button id="btn" onclick="submit()">Submit!</button>
|
|
<script>
|
|
function updateEmail(){
|
|
document.querySelector("#emailf").innerHTML = `Your email will be ${document.querySelector("#call").value}@email.radio!`
|
|
|
|
}
|
|
function submit(){
|
|
document.querySelector("#btn").disabled = true
|
|
var call = document.querySelector("#call").value
|
|
var email = document.querySelector("#email").value
|
|
|
|
fetch(`https://signup.email.radio/signup?email=${email}&callsign=${call}`)
|
|
.then(res=>res.json())
|
|
.then(res=>{
|
|
if (!res.success){
|
|
document.querySelector("#btn").disabled = false
|
|
|
|
alert(res.error)
|
|
} else {
|
|
alert("Please check your email for more information. Your callsign will be validated before your mailbox is created. This may take up to 48 hours.")
|
|
}
|
|
})
|
|
}
|
|
</script> |