alienhospital/secrets.html
2025-12-23 05:56:17 -05:00

72 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The web site of alienhospital</title>
<!-- The style.css file allows you to change the look of your web pages.
If you include the next line in all your web pages, they will all share the same look.
This makes it easier to make new pages for your site. -->
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
<center><a href="/homepage">home</a><br><img src="https://i.ibb.co/Kcbt5HYv/EMail-Wishing-Well.gif"><h3>use this form to get something off your chest. it will not be posted anywhere or told to anyone, your identity will not be recorded, and nothing about this will be shared with anyone else. mostly me just testing javascript capabilities, honestly.</h3>
<form onsubmit="sendContact(event)">
<div class="mb-3">
<label for="emailInput" class="form-label">name</label>
<input type="" class="form-control" id="emailInput">
</div>
<div class="mb-3">
<label for="messageInput" class="form-label">secret</label>
<textarea class="form-control" id="messageInput" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<script>
async function sendContact(ev) {
ev.preventDefault();
const senderEmail = document
.getElementById('emailInput').value;
const senderMessage = document
.getElementById('messageInput').value;
const webhookBody = {
embeds: [{
title: 'Contact Form Submitted',
fields: [
{ name: 'Sender', value: senderEmail },
{ name: 'Message', value: senderMessage }
]
}],
};
const webhookUrl = 'https://discord.com/api/webhooks/1368806194302423152/Cd8EtJAPTS6wDJXR_G0MiW4VbaHXCRHlT_0eSA-G4eD8WqJDEDnvcL2ypmil8_ytJ8HF';
const response = await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(webhookBody),
});
if (response.ok) {
alert('I have received your message!');
} else {
alert('There was an error! Try again later!');
}
}
</script>
</script>
</center>
</body>
<style>
body {
color: #fff;
background-color: #000;
}
</style>
</html>