chore: add plushie banner

This commit is contained in:
Miodec 2024-03-01 17:39:46 +01:00
parent d4ec11f3a4
commit 03311d8d6f
2 changed files with 21 additions and 19 deletions

View file

@ -46,34 +46,36 @@ $(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
);
}
// if (!window.localStorage.getItem("merchbannerclosed2")) {
// const merchBannerClosed =
// window.localStorage.getItem("merchbannerclosed") === "true";
// if (!merchBannerClosed) {
// Notifications.addBanner(
// `Three new merch designs, available at <a target="_blank" href="https://www.monkeytype.store/unisex-men-s-t-shirts/">monkeytype.store</a>`,
// `Check out our merchandise, available at <a target="_blank" rel="noopener" href="https://monkeytype.store/">monkeytype.store</a>`,
// 1,
// "images/cutoutbanner.png",
// "./images/merch2.png",
// false,
// () => {
// window.localStorage.setItem("merchbannerclosed2", "true");
// window.localStorage.setItem("merchbannerclosed", "true");
// },
// true
// );
// }
const plushieBannerClosed =
window.localStorage.getItem("plushieBannerClosed") === "true";
if (!plushieBannerClosed) {
Notifications.addBanner(
`George Plushie - available now for a limited time! <a target="_blank" rel="noopener" href="https://www.monkeytype.store/listing/george-plushie/">monkeytype.store</a>`,
1,
"./images/plushiebanner.png",
false,
() => {
window.localStorage.setItem("plushieBannerClosed", "true");
},
true
);
}
setTimeout(() => {
FunboxList.get(Config.funbox).forEach((it) =>
it.functions?.applyGlobalCSS?.()

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB