ClearlyElevated
8/12/2019 - 7:37 AM

Sends messages using Discord webhooks.

Sends messages using Discord webhooks.

<!DOCTYPE html>
<html>
<head>
    <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel=
    "stylesheet">
    <link href=
    "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css"
    rel="stylesheet">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>Discord Webhook Sender</title>
    <style>
    .btn-full-width {
    width: 100%;
    }
    </style>
</head>
<body>
    <main class="container">
        <div class="card card-panel center">
            <h1>Discord Webhook Sender</h1>
        </div>
        <div class="card card-panel">
            <div class="input-field">
                <input id="url" type="text"> <label for=
                "url">Webhook URL</label>
            </div>
            <div class="input-field">
                <input id="content" type="text"> <label for=
                "content">Text</label>
            </div>
            <div class="row">
                <div class="input-field s6 col">
                    <input id="username" type="text"> <label for=
                    "username">Username</label>
                </div>
                <div class="input-field s6 col">
                    <input id="avatar_url" type="text"> <label for=
                    "avatar_url">Avatar Url</label>
                </div>
            </div>
        </div><a class="btn btn-large btn-full-width waves-effect waves-light"
        href="#!">Send</a>
    </main>
    <script src="https://code.jquery.com/jquery-2.1.1.min.js" type=
    "text/javascript">
    </script> 
    <script src=
    "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/js/materialize.min.js">
    </script> 
    <script>
    $(function() {
        $('a').click(function(e) {
        var url = $("#url").val();
        var content = $("#content").val();
        var username = $("#username").val();
        var avatar_url = $("#avatar_url").val();
        $.post(url,
    {"content": content, "username": username, "avatar_url": avatar_url},
        function(){
            Materialize.toast('Message Sent!', 4000)
        });
        });
    });
    </script>
</body>
</html>