mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-24 23:04:00 +08:00
monke banner
This commit is contained in:
parent
7a76622cfb
commit
cf2924825a
2 changed files with 25 additions and 4 deletions
|
@ -31,14 +31,35 @@ $(document).ready(() => {
|
|||
if (Config.quickTab) {
|
||||
$("#restartTestButton").addClass("hidden");
|
||||
}
|
||||
if (!window.localStorage.getItem("merchbannerclosed")) {
|
||||
// if (!window.localStorage.getItem("merchbannerclosed")) {
|
||||
// Notifications.addBanner(
|
||||
// `Checkout our merchandise, available at <a target="_blank" href="https://monkeytype.store/">monkeytype.store</a>`,
|
||||
// 1,
|
||||
// "images/merchdropwebsite2.png",
|
||||
// false,
|
||||
// () => {
|
||||
// window.localStorage.setItem("merchbannerclosed", "true");
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
if (!window.localStorage.getItem("monkebannerclosed")) {
|
||||
const end = 1649368800000;
|
||||
const diff = end - Date.now();
|
||||
const string = Misc.secondsToString(
|
||||
diff / 1000,
|
||||
false,
|
||||
false,
|
||||
"text",
|
||||
false,
|
||||
true
|
||||
);
|
||||
Notifications.addBanner(
|
||||
`Checkout our merchandise, available at <a target="_blank" href="https://monkeytype.store/">monkeytype.store</a>`,
|
||||
`Reject humanity, <a target="_blank" href="https://www.monkeytype.store/listing/reject-humanity-black">become</a> <a target="_blank" href="https://www.monkeytype.store/listing/reject-humanity-white">monke</a>. (${string})`,
|
||||
1,
|
||||
"images/merchdropwebsite2.png",
|
||||
"images/becomemonke.png",
|
||||
false,
|
||||
() => {
|
||||
window.localStorage.setItem("merchbannerclosed", "true");
|
||||
window.localStorage.setItem("monkebannerclosed", "true");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
BIN
frontend/static/images/becomemonke.png
Normal file
BIN
frontend/static/images/becomemonke.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 266 KiB |
Loading…
Reference in a new issue