diff --git a/join/index.html b/join/index.html index df284b3..1eee12c 100644 --- a/join/index.html +++ b/join/index.html @@ -17,16 +17,15 @@

Welcome! Please use only lowercase letters and numbers for your username. After you have an account, learn more about exozyme or try our quickstart guide.

-
- - - - - - - + + + + + + + +
- diff --git a/join/script.js b/join/script.js deleted file mode 100644 index 3001369..0000000 --- a/join/script.js +++ /dev/null @@ -1,36 +0,0 @@ -const url = 'https://exozy.me/api/' -const form = document.querySelector('form') - -form.addEventListener('submit', (e) => { - e.preventDefault() - - const data = new Object() - data['type'] = 'new' - - for (const s of ['code', 'firstname', 'lastname', 'email', 'username', 'password']) { - data[s] = document.getElementsByName(s)[0].value - if (data[s] == '') { - alert('Please fill out the form completely') - return - } - } - - if (/^[a-z0-9]+$/.test(data['username']) === false || (data['username'][0] >= '0' && data['username'][0] <= '9')) { - alert('Username can only contain lowercase letters and numbers and can\'t start with a number') - return - } - - if (data['password'] != document.getElementsByName('confirmpassword')[0].value) { - alert('Passwords don\'t match') - return - } - - console.log(data) - - fetch(url, { - method: 'POST', - body: JSON.stringify(data), - }).then((response) => { - alert(response.statusText) - }) -})