built in the scripts since gh doesn't want to build the site

This commit is contained in:
awex
2021-06-03 01:20:35 -04:00
parent 88352aa11e
commit bb9ba8683b
3 changed files with 34 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
async function postEmbed() {
const link = document.getElementById("cliplink").value
console.log('Link:', link)
const webhook = document.getElementById("webhookURL").value
console.log('Webhook:', webhook)
const caption = document.getElementById("caption").value
console.log('Caption:', caption)
const username = document.getElementById("medalUsername").value
console.log('Username:', username)
const { response } = await fetch(`https://mcwapi.herokuapp.com/clip-check?clipLink=${link}&webhookURL=${webhook}&medalUsername=${username}&caption=${caption}`).then(response => response.json());
window.location.replace("https://awexxx.xyz/mcw?status=success");
console.log(response);
}
+16
View File
@@ -0,0 +1,16 @@
async function postPlain() {
const link = document.getElementById("cliplink").value
console.log('Link:', link)
const webhook = document.getElementById("webhookURL").value
console.log('Webhook:', webhook)
const caption = document.getElementById("caption").value
console.log('Caption:', caption)
const username = document.getElementById("medalUsername").value
console.log('Username:', username)
const { response } = await fetch(`https://mcwapi.herokuapp.com/clip-check-pt?clipLink=${link}&webhookURL=${webhook}&medalUsername=${username}&caption=${caption}`).then(response => response.json());
window.location.replace("https://awexxx.xyz/mcw?status=success");
console.log(response);
}
+2 -3
View File
@@ -155,10 +155,9 @@
<!--===============================================================================================-->
<script src="https://cdn.jsdelivr.net/gh/awexxx/medal-clip-webhook/assets/js/main.js"></script>
<script src="https://cdn.jsdelivr.net/gh/awexxx/medal-clip-webhook/assets/js/slideshow.js"></script>
<script src="https://cdn.jsdelivr.net/gh/awexxx/medal-clip-webhook/public/javascript/embed.js"></script>
<script src="https://cdn.jsdelivr.net/gh/awexxx/medal-clip-webhook/public/javascript/pt.js"></script>
<script src="assets/js/embed.js"></script>
<script src="assets/js/pt.js"></script>
<script src="https://awexxx.xyz/assets/js/q.js"></script>
<script src="assets/js/q.js"></script>
</body>
</html>