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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user