Retire the PolHunter launch card: launch announcements show 7 days after launchAt, then stop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-03 09:41:22 -05:00
parent 737ed28e1d
commit e484025d6d
3 changed files with 26 additions and 1 deletions
+3
View File
@@ -1648,11 +1648,14 @@
// launch-day surprise (Marty, 2026-09-20): PolHunter appears at siteConfig.launchAt, not a minute before.
// The card and the menu entry flip on their own if the dashboard is already open.
let phShown = false;
const LAUNCH_CARD_DAYS = 7;
async function launchReveal() {
try {
const nav = $('polhunterNav'); if (nav) nav.hidden = false; // listed in the menu from launch morning (Marty, 2026-09-21); the card below is the announcement and waits for launchAt
const cfg = await IAP.getConfig(); const at = cfg.launchAt ? new Date(cfg.launchAt).getTime() : 0;
if (!at || Date.now() < at) return;
// launch cards retire 7 days after launch (Marty, 2026-10-03: old announcements kept stacking up)
if (Date.now() > at + LAUNCH_CARD_DAYS * 86400000) { const c = $('phLaunch'); if (c) c.hidden = true; return; }
const card = $('phLaunch'); if (!card || phShown) return;
if (cardHidden('phLaunch')) { card.hidden = true; return; }
phShown = true; card.hidden = false;
+1 -1
View File
@@ -1129,7 +1129,7 @@
<script src="/assets/common.js?v=20260929b"></script><script src="/assets/welcome.js?v=20260923b"></script>
<script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20261002ref"></script>
<script src="/assets/my.js?v=20261003snz"></script>
<script src="/assets/my.js?v=20261003rlc"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>
</html>