Skip to content

Commit

Permalink
chore: remove plushie banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Mar 31, 2024
1 parent c20964d commit e497a19
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions frontend/src/ts/ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a target="_blank" rel="noopener" href="https://monkeytype.store/">monkeytype.store</a>`,
// 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! <a target="_blank" rel="noopener" href="https://mktp.co/plushie2">monkeytype.store</a>`,
`Check out our merchandise, available at <a target="_blank" rel="noopener" href="https://monkeytype.store/">monkeytype.store</a>`,
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! <a target="_blank" rel="noopener" href="https://mktp.co/plushie2">monkeytype.store</a>`,
// 1,
// "./images/plushiebanner.png",
// true,
// () => {
// window.localStorage.setItem("plushieBannerClosed2", "true");
// },
// true
// );
// }

setTimeout(() => {
FunboxList.get(Config.funbox).forEach((it) =>
it.functions?.applyGlobalCSS?.()
Expand Down

0 comments on commit e497a19

Please sign in to comment.