From bb9ba8683b27c2234adba116424e151465b5e2de Mon Sep 17 00:00:00 2001 From: awex Date: Thu, 3 Jun 2021 01:20:35 -0400 Subject: [PATCH] built in the scripts since gh doesn't want to build the site --- assets/js/mcw/embed.js | 16 ++++++++++++++++ assets/js/mcw/pt.js | 16 ++++++++++++++++ mcw.html | 5 ++--- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 assets/js/mcw/embed.js create mode 100644 assets/js/mcw/pt.js diff --git a/assets/js/mcw/embed.js b/assets/js/mcw/embed.js new file mode 100644 index 0000000..22d7c4c --- /dev/null +++ b/assets/js/mcw/embed.js @@ -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); +} \ No newline at end of file diff --git a/assets/js/mcw/pt.js b/assets/js/mcw/pt.js new file mode 100644 index 0000000..0c9796d --- /dev/null +++ b/assets/js/mcw/pt.js @@ -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); +} \ No newline at end of file diff --git a/mcw.html b/mcw.html index ea4fc27..8b8c14c 100644 --- a/mcw.html +++ b/mcw.html @@ -155,10 +155,9 @@ - - + + - \ No newline at end of file