From c6878e55395a1e81bb9b00be9988c09713dfe7f7 Mon Sep 17 00:00:00 2001 From: Archie Baer Date: Sat, 15 Jun 2019 22:41:42 +0100 Subject: [PATCH] nvm --- signup.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/signup.js b/signup.js index 5006aa8..98af735 100644 --- a/signup.js +++ b/signup.js @@ -4,7 +4,7 @@ function signup() { if (sent) return; var email = emailAddr.value; if (!validateEmail(email)) return; - mailbtn.classList.add("fa-times"); + mailbtn.classList.add("fa-clock"); mailbtn.classList.remove("mail-button"); mailbtn.blur(); console.log("Sending request..."); @@ -12,10 +12,8 @@ function signup() { var req = new XMLHttpRequest(); req.onload = function () { console.log(this.status + ": " + this.responseText); - if (this.status) { - mailbtn.classList.remove("fa-times"); - mailbtn.classList.add("fa-check"); - } + mailbtn.classList.remove("fa-clock"); + mailbtn.classList.add("fa-" + (this.status === 200 ? "check" : "times")); }; req.open("POST", "https://whserver.dforms.point0.tech/589550963468140574"); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");