commit 943504d74af5268e4515d12282be9bb68143a256 Author: gelis07 <68599597+gelis07@users.noreply.github.com> Date: Mon Oct 4 17:09:00 2021 +0300 Add files via upload diff --git a/index.html b/index.html new file mode 100644 index 0000000..d898f84 --- /dev/null +++ b/index.html @@ -0,0 +1,24 @@ + + + + + + + Contact Page discord + + + + +
+

Contact

+ + + +

Message sent!

+

Message failed!

+
+ + \ No newline at end of file diff --git a/main.css b/main.css new file mode 100644 index 0000000..75fd843 --- /dev/null +++ b/main.css @@ -0,0 +1,128 @@ +body{ + background-color: #481D24; +} +.Contact{ + display: flex; + justify-content: center; + flex-direction: column; + align-items: center; + position: relative; + margin-bottom: 100px; +} +#ContactTip{ + font-family: rubik; + text-align: center; + color: #FF9480; + font-size: 1rem; +} +#ContactText{ + font-family: rubik; + color: #C69C72; + font-size: 5vw; +} +#InputField{ + width: 50%; + height: 400px; + border: none; + border-radius: 20px; + background-color: #C5283D; + font-size: 1em; + font-family: rubik; + padding: 20px; + border: none; + outline: none; +} +#SendMessage{ + position: absolute; + width: 8%; + height: 50px; + bottom: -8%; + right: 23.5%; + font-size: 1em; + border: none; + border-radius: 20px; + background-color: #009FB7; + color: #023C40; + font-family: rubik; + cursor: pointer; + animation: Btn1, 1s; + font-size: 1vw; + transition: background-color 1s; +} +#MessageSent{ + position: absolute; + width: 8%; + height: 50px; + bottom: -18%; + right: 23.5%; + font-size: 1em; + border: none; + border-radius: 20px; + color: #72C675; + opacity: 0; + font-family: rubik; + cursor: pointer; + transition: opacity 2s; +} +#MessageFailed{ + position: absolute; + width: 8%; + height: 50px; + bottom: -18%; + right: 23.5%; + font-size: 1em; + border: none; + border-radius: 20px; + color: #C67272; + opacity: 0; + font-family: rubik; + cursor: pointer; + transition: opacity 2s; + +} +#SendMessage:hover{ + animation: HoverBtn1, 1s; + background-color: #A8B5D2; +} +.Name-Input input{ + border: none; + appearance: none; + padding: 12px; + border-radius: 3px; + width: 120%; + outline: none; + background-color: #C5283D; + font-family: rubik; + color: #222; +} +.Name-Input{ + position: relative; + font-size: 14px; + padding-top: 20px; + margin-bottom: 20px; + font-family: rubik; + margin-right: 35%; +} +.Name-Input .placeholder{ + position: absolute; + left: 12px; + color: #222; + opacity: 0.7; + top: calc(50% + 10px); + transform: translateY(-50%); + font-family: rubik; + transition: + top 0.3s ease, + font-size 0.3s ease, + color 0.3s ease; +} +.Name-Input input:valid + .placeholder{ + top: 10px; + font-size: 10px; + color: #222; +} +.Name-Input input:focus + .placeholder{ + top: 10px; + font-size: 10px; + color: #222; +} \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..2415b96 --- /dev/null +++ b/main.js @@ -0,0 +1,59 @@ +window.addEventListener("load", function () { + const loader = document.querySelector(".loader-wrapper"); + console.log(loader) + loader.className += " hidden"; // class "loader hidden" +}); +/* +whurl variable should be equal to your webhooks link! + + +On discord you create a webhook by going to +the server settings and from there to the +integrations tab, then click on webhooks and +press new webhook. Then copy the link and paste it +in the whurl variable. + +Make sure to hide this link using https://javascriptobfuscator.com/Javascript-Obfuscator.aspx +if someone takes this link they can send messages to you with this webhook so make sure to +hide this link! +*/ +whurl = "" +var str= ""; +var name= ""; +function f1(){ + name = document.getElementById("NameInput").value; + str = document.getElementById("InputField").value; + console.log(document.getElementById("InputField").value) +} +function send(){ + f1(); + const msg = { + "content": str, + "username": name + }; + console.log(msg) + if(str == ""){ + document.getElementById("Message1").style.opacity = 1; + setTimeout(function(){ + document.getElementById("Message1").style.opacity = 0; + }, 4000) + console.log("ERROR") + return; + } + try{ + fetch(whurl + "?wait=true", {"method":"POST", "headers": {"content-type": "application/json"}, "body": JSON.stringify(msg)}); + document.getElementById("InputField").value = ""; + document.getElementById("MessageSent").style.opacity = 1; + setTimeout(function(){ + document.getElementById("MessageSent").style.opacity = 0; + }, 4000) + + } catch(e){ + document.getElementById("MessageFailed").style.opacity = 1; + + setTimeout(function(){ + document.getElementById("MessageFailed").style.opacity = 0; + }, 4000) + } + +} \ No newline at end of file