mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 14:07:03 +01:00
Notice to vote on DBL
This commit is contained in:
parent
bb4bf70fb1
commit
d368fdf686
@ -462,15 +462,39 @@
|
||||
prepare_guild(data);
|
||||
$('#loginmodal').modal('close');
|
||||
unlock_login_fields();
|
||||
setTimeout(displayDblAdvert, 1500);
|
||||
});
|
||||
} else {
|
||||
switch_to_default_channel(guildobj.channels);
|
||||
prepare_guild(guildobj);
|
||||
$('#loginmodal').modal('close');
|
||||
unlock_login_fields();
|
||||
setTimeout(displayDblAdvert, 1500);
|
||||
}
|
||||
}
|
||||
|
||||
function displayDblAdvert() {
|
||||
var hideDbl = localStorage.getItem("hideDiscordBotsOrgVoteAd") == "true";
|
||||
if (hideDbl) {
|
||||
return;
|
||||
}
|
||||
var dblAdContents = "<i class=\"material-icons right\">close</i></span><span id=\"dblBalloon\"><h6>Loving the Titan, the Discord server widget?</h6><br>Show your appreciation <strong>by voting for Titan</strong> on <a href=\"https://discordbots.org/bot/Titan/vote\" target=\"_blank\">Discord Bot List</a> and get a <span class=\"yellow-text\">golden</span> name!";
|
||||
$(".brand-logo").showBalloon({
|
||||
html: true,
|
||||
position: "bottom",
|
||||
contents: dblAdContents,
|
||||
classname: "dblballoon",
|
||||
showComplete: function () {
|
||||
$(".dblballoon").css("top", $(".brand-logo").outerHeight() + "px").css("position", "fixed");
|
||||
$(".dblballoon").find("i").click(function (event) {
|
||||
event.preventDefault();
|
||||
$(".brand-logo").hideBalloon();
|
||||
localStorage.setItem("hideDiscordBotsOrgVoteAd", "true");
|
||||
}).css("cursor", "pointer");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function switch_to_default_channel(guildchannels) {
|
||||
var defaultChannel = getParameterByName("defaultchannel");
|
||||
if (!defaultChannel) {
|
||||
|
10
webapp/titanembeds/static/js/vendor/jquery.balloon.min.js
vendored
Normal file
10
webapp/titanembeds/static/js/vendor/jquery.balloon.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -294,6 +294,7 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.3/es6-shim.min.js" integrity="sha256-THlgZSjqt7idNSdnUvGypTuXB5C4hV9kSuPYrbiq19o=" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="{{ url_for("static", filename="js/vendor/highlight.pack.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/vendor/jquery.balloon.min.js") }}"></script>
|
||||
|
||||
{% raw %}
|
||||
<script id="mustache_channellistings" type="text/template">
|
||||
|
Loading…
Reference in New Issue
Block a user