mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-29 10:17:30 +08:00
chore: add plushie banner
This commit is contained in:
parent
d4ec11f3a4
commit
03311d8d6f
2 changed files with 21 additions and 19 deletions
|
|
@ -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?.()
|
||||
|
|
|
|||
BIN
frontend/static/images/plushiebanner.png
Normal file
BIN
frontend/static/images/plushiebanner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Loading…
Add table
Reference in a new issue