From 9ffc269e43e593a2c1dfd3581a33706a8331ca53 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 31 Dec 2021 15:06:09 -0600 Subject: [PATCH] winter sale: update banner interval. Reset cookie and set the hide banner interval to 1 hour for the final three hours of the sale. --- app/javascript/src/javascripts/common.js | 2 +- app/views/layouts/default.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/src/javascripts/common.js b/app/javascript/src/javascripts/common.js index 6d8eb9776..f2ae7e975 100644 --- a/app/javascript/src/javascripts/common.js +++ b/app/javascript/src/javascripts/common.js @@ -9,7 +9,7 @@ $(function() { $("#hide-promotion-notice").on("click.danbooru", function(e) { $("#promotion-notice").hide(); - Cookie.put("hide_promotion_notice", "1", 1 * 18 * 60 * 60); + Cookie.put("hide_winter_sale_notice", "1", 1 * 60 * 60); Cookie.put("hide_upgrade_account_notice", "1", 7 * 24 * 60 * 60); e.preventDefault(); }); diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index a12cb7945..67a8c53cc 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -80,7 +80,7 @@
<%= render "users/verification_notice" %> - <% if Danbooru.config.is_promotion? && cookies[:hide_promotion_notice].blank? %> + <% if Danbooru.config.is_promotion? && cookies[:hide_winter_sale_notice].blank? %>
<% file = %w[provgift.png kemogift.png padoru.gif ablobgift.gif].sample %> <%= tag.img src: "/images/#{file}", width: 32, height: 32 %>