-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fb5b84
commit 6f0aaa5
Showing
1 changed file
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
|
||
<head> | ||
<title>Webhook Deliverer | G9 Aerospace</title> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | ||
<meta name="keywords" content="G9 Aerospace, Webhook, Discord, Messaging"> | ||
<meta name="author" content="G9 Aerospace"> | ||
<link rel="stylesheet" href="assets/css/main.css" /> | ||
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript> | ||
<link rel="icon" type="image/png" href="images/g9aerospace.png"> | ||
</head> | ||
|
||
<body class="is-preload landing"> | ||
<div id="page-wrapper"> | ||
<!-- Header --> | ||
<header id="header"> | ||
<h1 id="logo"><a>G9 Aerospace | Webhook Deliverer</a></h1> | ||
<nav id="nav"> | ||
<!-- Add your navigation links here if needed --> | ||
</nav> | ||
</header> | ||
|
||
<!-- Main Content --> | ||
<section id="main" class="wrapper"> | ||
<div class="inner"> | ||
<form id="webhook-form"> | ||
<label for="webhook-url">Webhook URL:</label> | ||
<input type="text" id="webhook-url" name="webhook-url" required> | ||
|
||
<label for="message">Message:</label> | ||
<textarea id="message" name="message" rows="4" required></textarea> | ||
|
||
<label for="embed-name">Embed Name:</label> | ||
<input type="text" id="embed-name" name="embed-name"> | ||
|
||
<label for="embed-description">Embed Description:</label> | ||
<textarea id="embed-description" name="embed-description" rows="2"></textarea> | ||
|
||
<label for="embed-color">Embed Color:</label> | ||
<input type="color" id="embed-color" name="embed-color" value="#3498db"> | ||
|
||
<!-- Embed Fields --> | ||
<div id="embed-fields"> | ||
<label>Embed Fields:</label> | ||
<div class="field"> | ||
<input type="text" name="field-name[]" placeholder="Field Name"> | ||
<input type="text" name="field-value[]" placeholder="Field Value"> | ||
<input type="checkbox" name="inline[]" value="1"> Inline | ||
</div> | ||
<!-- Users can add more fields dynamically using JavaScript --> | ||
</div> | ||
|
||
<label for="footer">Footer:</label> | ||
<input type="text" id="footer" name="footer"> | ||
|
||
<label for="thumbnail">Thumbnail URL:</label> | ||
<input type="text" id="thumbnail" name="thumbnail"> | ||
|
||
<input type="submit" value="Send Webhook"> | ||
</form> | ||
</div> | ||
</section> | ||
|
||
<!-- Footer --> | ||
<footer id="footer"> | ||
<ul class="icons"> | ||
<li><a href="https://www.instagram.com/g9aerospace/" target="_blank" | ||
class="icon brands alt fa-instagram"><span class="label">Instagram</span></a></li> | ||
<li><a href="https://github.com/g9militantsYT" target="_blank" | ||
class="icon brands alt fa-github"><span class="label">GitHub</span></a></li> | ||
<li><a href="https://www.youtube.com/@G9AEROSPACEYT" target="_blank" | ||
class="icon brands alt fa-youtube"><span class="label">YouTube</span></a></li> | ||
</ul> | ||
<ul class="copyright"> | ||
<li>© G9 Aerospace. All rights reserved.</li> | ||
</ul> | ||
</footer> | ||
</div> | ||
|
||
<!-- Scripts --> | ||
<script src="assets/js/jquery.min.js"></script> | ||
<script src="assets/js/jquery.scrolly.min.js"></script> | ||
<script src="assets/js/jquery.dropotron.min.js"></script> | ||
<script src="assets/js/jquery.scrollex.min.js"></script> | ||
<script src="assets/js/browser.min.js"></script> | ||
<script src="assets/js/breakpoints.min.js"></script> | ||
<script src="assets/js/util.js"></script> | ||
<script src="assets/js/main.js"></script> | ||
<script> | ||
document.getElementById("webhook-form").addEventListener("submit", function (event) { | ||
event.preventDefault(); | ||
|
||
fetch(document.getElementById("webhook-url").value, { | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json" | ||
}, | ||
body: JSON.stringify({ | ||
content: document.getElementById("message").value, | ||
embeds: [{ | ||
title: document.getElementById("embed-name").value, | ||
description: document.getElementById("embed-description").value, | ||
color: parseInt(document.getElementById("embed-color").value.replace("#", ""), 16), | ||
fields: getEmbedFields(), | ||
footer: { | ||
text: document.getElementById("footer").value | ||
}, | ||
thumbnail: { | ||
url: document.getElementById("thumbnail").value | ||
} | ||
}] | ||
}) | ||
}) | ||
.then(response => response.json()) | ||
.then(data => { | ||
console.log("Webhook sent successfully:", data); | ||
// You can add any further actions here after the webhook is sent | ||
}) | ||
.catch(error => { | ||
console.error("Error sending webhook:", error); | ||
// Handle errors here | ||
}); | ||
}); | ||
|
||
function getEmbedFields() { | ||
let fields = []; | ||
let fieldElements = document.querySelectorAll("#embed-fields .field"); | ||
fieldElements.forEach(fieldElement => { | ||
let fieldName = fieldElement.querySelector("input[name='field-name[]']").value; | ||
let fieldValue = fieldElement.querySelector("input[name='field-value[]']").value; | ||
let inline = fieldElement.querySelector("input[name='inline[]']").checked; | ||
fields.push({ | ||
name: fieldName, | ||
value: fieldValue, | ||
inline: inline | ||
}); | ||
}); | ||
return fields; | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |