diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index f83753d..78c567e 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -474,11 +474,16 @@ } function displayDblAdvert() { - var hideDbl = localStorage.getItem("hideDiscordBotsOrgVoteAd") == "true"; - if (hideDbl) { - return; + var hideDblUntil = localStorage.getItem("hideDiscordBotsOrgVoteAdUntil"); + var now = moment(); + var hideDblUntilMoment = null; + if (hideDblUntil) { + hideDblUntilMoment = moment(hideDblUntil); + if (hideDblUntilMoment.isValid() && hideDblUntilMoment > now) { + return; + } } - var dblAdContents = "close
Loving the Titan, the Discord server widget?

Show your appreciation by voting for Titan on Discord Bot List and get a golden name!"; + var dblAdContents = "close
Loving the Titan, the Discord server widget?

Show your appreciation by voting for Titan daily on Discord Bot List and get a golden name!"; $(".brand-logo").showBalloon({ html: true, position: "bottom", @@ -489,7 +494,7 @@ $(".dblballoon").find("i").click(function (event) { event.preventDefault(); $(".brand-logo").hideBalloon(); - localStorage.setItem("hideDiscordBotsOrgVoteAd", "true"); + localStorage.setItem("hideDiscordBotsOrgVoteAdUntil", now.add(3, "days").toISOString()); }).css("cursor", "pointer"); } });