From e497a192f915fe92f912d11c8a9352d13f604fa1 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sun, 31 Mar 2024 13:19:09 +0200 Subject: [PATCH] chore: remove plushie banner --- frontend/src/ts/ready.ts | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/frontend/src/ts/ready.ts b/frontend/src/ts/ready.ts index b2bc09cce..65a2a3a91 100644 --- a/frontend/src/ts/ready.ts +++ b/frontend/src/ts/ready.ts @@ -48,39 +48,39 @@ $(document).ready(() => { if (Config.quickRestart !== "off") { $("#restartTestButton").addClass("hidden"); } - // const merchBannerClosed = - // window.localStorage.getItem("merchbannerclosed") === "true"; - // if (!merchBannerClosed) { - // Notifications.addBanner( - // `Check out our merchandise, available at monkeytype.store`, - // 1, - // "./images/merch2.png", - // false, - // () => { - // window.localStorage.setItem("merchbannerclosed", "true"); - // }, - // true - // ); - // } - - const plushieBannerClosed2 = - window.localStorage.getItem("plushieBannerClosed2") === "true"; - if (!plushieBannerClosed2) { - const string = formatDistanceStrict(1711918800000, Date.now(), { - roundingMethod: "floor", - }); + const merchBannerClosed = + window.localStorage.getItem("merchbannerclosed") === "true"; + if (!merchBannerClosed) { Notifications.addBanner( - `Our limited plushie will be gone in ${string} - don't miss out! monkeytype.store`, + `Check out our merchandise, available at monkeytype.store`, 1, - "./images/plushiebanner.png", - true, + "./images/merch2.png", + false, () => { - window.localStorage.setItem("plushieBannerClosed2", "true"); + window.localStorage.setItem("merchbannerclosed", "true"); }, true ); } + // const plushieBannerClosed2 = + // window.localStorage.getItem("plushieBannerClosed2") === "true"; + // if (!plushieBannerClosed2) { + // const string = formatDistanceStrict(1711882800000, Date.now(), { + // roundingMethod: "floor", + // }); + // Notifications.addBanner( + // `Our limited plushie will be gone in ${string} - don't miss out! monkeytype.store`, + // 1, + // "./images/plushiebanner.png", + // true, + // () => { + // window.localStorage.setItem("plushieBannerClosed2", "true"); + // }, + // true + // ); + // } + setTimeout(() => { FunboxList.get(Config.funbox).forEach((it) => it.functions?.applyGlobalCSS?.()