From 429f5de96ec39b8bad10af6d02a9894bb74f945b Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 14 Jan 2022 19:50:22 +0100 Subject: [PATCH] using new banners for merch banner --- src/js/ready.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/js/ready.js b/src/js/ready.js index bb6346d08..d54b12a05 100644 --- a/src/js/ready.js +++ b/src/js/ready.js @@ -8,6 +8,7 @@ import * as UI from "./ui"; import * as SignOutButton from "./sign-out-button"; import * as MonkeyPower from "./monkey-power"; import * as NewVersionNotification from "./new-version-notification"; +import * as Notifications from "./notifications"; ManualRestart.set(); Misc.migrateFromCookies(); @@ -31,9 +32,15 @@ $(document).ready(() => { $("#restartTestButton").addClass("hidden"); } if (!window.localStorage.getItem("merchbannerclosed")) { - $(".merchBanner").removeClass("hidden"); - } else { - $(".merchBanner").remove(); + Notifications.addBanner( + `Checkout our merchandise, available at monkeytype.store`, + 1, + "images/merchdropwebsite2.png", + false, + () => { + window.localStorage.setItem("merchbannerclosed", true); + } + ); } $("#centerContent") .css("opacity", "0")