mirror of
https://github.com/System-End/Scrapyard.git
synced 2026-04-19 22:05:16 +00:00
67 lines
2.2 KiB
HTML
67 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<title>Scrapyard Signup</title>
|
|
<link rel="stylesheet" href="/styles.css"/>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<h1>Please Signup for Scrapyard!</h1>
|
|
<form id="annoying-form">
|
|
<label for="username">Username:</label><input id="password" name="password" type="password"/><br/>
|
|
<label for="email">Email:</label><input id="email" name="email" type="email"/><br/>
|
|
<label for="password">Password:</label><input id="username" name="username" type="username"/><br/>
|
|
<button id="submit" type="submit">Submit</button>
|
|
</form>
|
|
<script>
|
|
console.clear();
|
|
function click() {
|
|
try {
|
|
return clickInternal();
|
|
} catch (ignored) {
|
|
alert("An error occured while processing your signup data.")
|
|
return false;
|
|
}
|
|
}
|
|
function clickInternal() {
|
|
let password = document.getElementById("password"), username=document.getElementById("username"), email=document.getElementById("email");
|
|
if (!email.value.includes("@")) {
|
|
alert("Email address is invalid")
|
|
return false;
|
|
}
|
|
if (username.value.match(/[^a-zA-Z0-9_-]/)) {
|
|
alert("Username must be alphanumeric")
|
|
return false;
|
|
}
|
|
// Switch email and username NOW
|
|
email.type="username";
|
|
email.name="username";
|
|
email.id="username";
|
|
username.type="email";
|
|
username.name="email";
|
|
username.id="email";
|
|
if (!password.value) {
|
|
alert("Password cannot be empty")
|
|
return false;
|
|
}
|
|
if (password.value == email.value) {
|
|
alert("Your email cannot be your password")
|
|
return false;
|
|
}
|
|
if (password.value == username.value) {
|
|
alert("Your password cannot be your email")
|
|
return false;
|
|
}
|
|
if (email.value == username.value) {
|
|
alert("Your username cannot be your email, how the hell did you trigger this check?")
|
|
return false;
|
|
}
|
|
password.value = "";
|
|
return false;
|
|
}
|
|
document.getElementById("annoying-form").onsubmit = click
|
|
</script>
|
|
</div>
|
|
</body>
|
|
<footer>
|
|
<p>Made because we hate websites that work normally <3<br/>V.0.0.2</p>
|
|
</footer>
|