Launch-day surprise: PolHunter card on the Overview and the menu entry appear at siteConfig.launchAt (self-flipping, nothing visible before)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1404,6 +1404,21 @@
|
||||
}));
|
||||
} catch (e) {}
|
||||
}
|
||||
// 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;
|
||||
async function launchReveal() {
|
||||
try {
|
||||
const cfg = await IAP.getConfig(); const at = cfg.launchAt ? new Date(cfg.launchAt).getTime() : 0;
|
||||
if (!at || Date.now() < at) return;
|
||||
const nav = $('polhunterNav'); if (nav) nav.hidden = false;
|
||||
const card = $('phLaunch'); if (!card || phShown) return; phShown = true; card.hidden = false;
|
||||
card.innerHTML = '<div class="card-head"><h3>\u{1F3AF} New today: PolHunter</h3><span class="sub">Launch-day surprise</span></div>'
|
||||
+ '<p>Missions across our sites. Visit the site, find your personal code on the page, type it in, and a random drip of POL lands in the wallet on this account, on chain, with a link to prove it. Three missions a day, a leaderboard with weekly POL prizes, and badge cards you can share. Your PolHunter share link puts sign-ups on your InstantAdPay line.</p>'
|
||||
+ '<a class="btn" href="/api/my/polhunter">Open my PolHunter board</a> <a class="btn sec" href="https://polhunter.com/" target="_blank" rel="noopener">Watch the 30-second teaser</a>';
|
||||
} catch (e) {}
|
||||
}
|
||||
launchReveal(); setInterval(launchReveal, 30000);
|
||||
// came from PolHunter (iap.return cookie): one card at the top of the Overview that sends them back
|
||||
async function loadReturnCard() {
|
||||
const card = $('phReturn'); if (!card) return;
|
||||
|
||||
Reference in New Issue
Block a user