mirror of
https://github.com/System-End/Scrapyard.git
synced 2026-04-19 20:55:16 +00:00
Add "support" when you fail.
This commit is contained in:
parent
91d1c7df48
commit
ce26fae26a
1 changed files with 29 additions and 3 deletions
32
index.html
32
index.html
|
|
@ -20,7 +20,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript><h1>Nice try buddy. Enable javascript, cheater.</h1></noscript>
|
<noscript><h1>Nice try buddy. Enable javascript, cheater.</h1></noscript>
|
||||||
<div class="login-container">
|
<div> <!-- login form /!-->
|
||||||
<marquee>
|
<marquee>
|
||||||
<h1 id="header">Please Signup for Scrapyard!</h1>
|
<h1 id="header">Please Signup for Scrapyard!</h1>
|
||||||
<form id="annoying-form">
|
<form id="annoying-form">
|
||||||
|
|
@ -30,6 +30,11 @@
|
||||||
<label for="color">Color: </label><span id="value" name="value" type="value">#______</span> <input id="color" name="color" type="text"/><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="button" disabled="true" aria-disabled="true">Submit</button>
|
<button id="submit" type="button" disabled="true" aria-disabled="true">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
<div> <!-- login form /!-->
|
||||||
|
<h2>Support:</h2>
|
||||||
|
<p id="support">No support yet...</p>
|
||||||
|
</div>
|
||||||
<marquee>
|
<marquee>
|
||||||
<script>
|
<script>
|
||||||
var tim, show=false;
|
var tim, show=false;
|
||||||
|
|
@ -58,6 +63,10 @@
|
||||||
let fonts=["Georiga", "Arial", "Verdana", "Tahoma", '"Trebuchet MS"', '"Times New Roman"', "Garmond", '"Courier New"', '"Bush Script MT"'];
|
let fonts=["Georiga", "Arial", "Verdana", "Tahoma", '"Trebuchet MS"', '"Times New Roman"', "Garmond", '"Courier New"', '"Bush Script MT"'];
|
||||||
return fonts[Math.floor(Math.random() * fonts.length)]
|
return fonts[Math.floor(Math.random() * fonts.length)]
|
||||||
}
|
}
|
||||||
|
function insult(failReason) {
|
||||||
|
document.getElementById("support").innerHTML = "Pending reply from support..."
|
||||||
|
fetch('https://ai.hackclub.com/chat/completions', {method: 'POST',headers: {'Content-Type': 'application/json'},body: JSON.stringify({'messages': [{'role': 'user','content': `You are an AI support bot on a very annoying sigunup page. Your objective is not to help the user, merely to roast them. Use HTML for formatting, not markdown. You should return a single \`<p>\` element, though you can have extra italic/bold/etc elements within. Exclude the \`<p>\` tag itself, just return the \`innerHTML\` of it. ${failReason}`}]})}).then((r)=>{return r.json()}).then((d)=>{document.getElementById("support").innerHTML=d["choices"][0]["message"]["content"]})
|
||||||
|
}
|
||||||
getRandomColor();
|
getRandomColor();
|
||||||
console.clear();
|
console.clear();
|
||||||
function blah() {
|
function blah() {
|
||||||
|
|
@ -120,15 +129,28 @@
|
||||||
if (color.value != value.getAttribute("val")) {
|
if (color.value != value.getAttribute("val")) {
|
||||||
alert("Color incorrect.")
|
alert("Color incorrect.")
|
||||||
getRandomColor();
|
getRandomColor();
|
||||||
|
insult("The user failed the color-based human verification check.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
getRandomColor();
|
getRandomColor();
|
||||||
|
if (!email.value) {
|
||||||
|
alert("Email cannot be empty")
|
||||||
|
insult("The user did not enter an email.")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!email.value.includes("@")) {
|
if (!email.value.includes("@")) {
|
||||||
alert("Email address is invalid")
|
alert("Email address is invalid")
|
||||||
|
insult("The user entered an invalid email.")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!username.value) {
|
||||||
|
alert("Email cannot be empty")
|
||||||
|
insult("The user did not enter a username.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (username.value.match(/[^a-zA-Z0-9]/)) {
|
if (username.value.match(/[^a-zA-Z0-9]/)) {
|
||||||
alert("Username must be alphanumeric")
|
alert("Username must be alphanumeric")
|
||||||
|
insult("The user entered an invalid username.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Switch email and username NOW
|
// Switch email and username NOW
|
||||||
|
|
@ -140,18 +162,22 @@
|
||||||
username.id="email";
|
username.id="email";
|
||||||
if (!password.value) {
|
if (!password.value) {
|
||||||
alert("Password cannot be empty")
|
alert("Password cannot be empty")
|
||||||
|
insult("The user did not enter a password.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (password.value == email.value) {
|
if (password.value == email.value) {
|
||||||
alert("Your email cannot be your password")
|
alert("Your email cannot be your password")
|
||||||
|
insult("The user entered the same value for both their email and password.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (password.value == username.value) {
|
if (password.value == username.value) {
|
||||||
alert("Your password cannot be your email")
|
alert("Your username cannot be your password")
|
||||||
|
insult("The user entered the same value for both their username and password.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (email.value == username.value) {
|
if (email.value == username.value) {
|
||||||
alert("Your username cannot be your email, how the hell did you trigger this check?")
|
alert("Your username cannot be your email, how the hell did you trigger this check?")
|
||||||
|
insult("The user triggered an impossible fail condition.")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
password.value = "";
|
password.value = "";
|
||||||
|
|
@ -184,5 +210,5 @@
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<footer>
|
<footer>
|
||||||
<p>Made because we hate websites that work normally <3<br/>V.0.0.20<br/>Made by <a href="https://endoftimee.tech">EndOfTimee</a> and <a href="https://firepup650.com">Firepup650</a></p>
|
<p>Made because we hate websites that work normally <3<br/>V.0.0.21<br/>Made by <a href="https://endoftimee.tech">EndOfTimee</a> and <a href="https://firepup650.com">Firepup650</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue