Scrapyard/index.html
2025-03-01 18:27:10 -06:00

107 lines
3.7 KiB
HTML

<!DOCTYPE html>
<head>
<title>Scrapyard Signup</title>
<style>
* {
background-color: #000000;
color: #9400D3;
font-family: Georiga, monospace;
}
a {
color: #FF0000;
text-decoration: line-through;
}
</style>
</head>
<body>
<div class="login-container">
<marquee>
<h1>Please Signup for Scrapyard!</h1>
<form id="annoying-form">
<marquee><label for="username">Username:</label><input id="password" name="password" type="password"/></marquee>
<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/>
<label for="color">Color: </label><span id="value" name="value" type="value">#______</span> <input id="color" name="color" type="text"/><br/>
<button id="submit" type="submit">Submit</button>
</form>
<marquee>
<script>
// below two functions modified from https://stackoverflow.com/a/1484514
function getRandomColor() {
let letters = "0123456789ABCDEF", color = "#";
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
document.getElementById("value").style=`background-color: ${color}`;
document.getElementById("value").setAttribute("val", color);
}
function color() {
let letters = "0123456789ABCDEF", color = "#";
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
getRandomColor();
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"), color=document.getElementById("color"), value=document.getElementById("value");
if (color.value != value.getAttribute("val")) {
alert("Color incorrect.")
getRandomColor();
return false;
}
getRandomColor();
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;
function erase() {
document.getElementById("password").value=""
}
setInterval(erase, 2000)
</script>
</div>
</body>
<footer>
<p>Made because we hate websites that work normally <3<br/>V.0.0.7<br/>Made by <a href="https://endoftimee.tech">EndOfTimee</a> and <a href="https://firepup650.com">Firepup650</a></p>
</footer>