Basic server information and discord.gg btn

This commit is contained in:
Jeremy Zhang
2017-05-24 05:03:48 +00:00
parent 029bcff59d
commit bb35d3700b
2 changed files with 38 additions and 14 deletions

View File

@ -80,6 +80,14 @@
return funct.promise();
}
function discord_embed() {
var funct = $.ajax({
dataType: "json",
url: "https://discordapp.com/api/guilds/" + guild_id + "/widget.json",
});
return funct.promise();
}
$(function() {
$("#focusmodal").modal({
dismissible: true,
@ -106,6 +114,11 @@
$("#focusmodal").modal("close");
has_already_been_focused = true;
var dembed = discord_embed();
dembed.done(function (data) {
$("#modal_invite_btn").attr("href", data.instant_invite);
});
$("#loginmodal").modal({
dismissible: false, // Modal can be dismissed by clicking outside of the modal
opacity: .5, // Opacity of modal background