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:
martbost
2026-09-20 05:16:30 -05:00
parent 7ea7a5f409
commit 9a531538ed
2 changed files with 18 additions and 1 deletions
+15
View File
@@ -1404,6 +1404,21 @@
})); }));
} catch (e) {} } 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 // came from PolHunter (iap.return cookie): one card at the top of the Overview that sends them back
async function loadReturnCard() { async function loadReturnCard() {
const card = $('phReturn'); if (!card) return; const card = $('phReturn'); if (!card) return;
+3 -1
View File
@@ -141,6 +141,7 @@
<button data-pane="earnings" type="button"><svg viewBox="0 0 24 24"><path d="M4 17l5-5 4 3 7-8"/><path d="M14 7h6v6"/></svg>Earnings</button> <button data-pane="earnings" type="button"><svg viewBox="0 0 24 24"><path d="M4 17l5-5 4 3 7-8"/><path d="M14 7h6v6"/></svg>Earnings</button>
<button data-pane="promo" type="button"><svg viewBox="0 0 24 24"><path d="M7 10s5-1 9-5v14c-4-4-9-5-9-5H5a2 2 0 0 1-2-2v0a2 2 0 0 1 2-2h2z"/><path d="M8 15l1 5h2l-1-5"/></svg>Promo tools</button> <button data-pane="promo" type="button"><svg viewBox="0 0 24 24"><path d="M7 10s5-1 9-5v14c-4-4-9-5-9-5H5a2 2 0 0 1-2-2v0a2 2 0 0 1 2-2h2z"/><path d="M8 15l1 5h2l-1-5"/></svg>Promo tools</button>
<button data-pane="training" type="button"><svg viewBox="0 0 24 24"><path d="M3 5l9-2 9 2v11l-9 2-9-2z"/><path d="M12 3v13"/><path d="M9 11l3 2 3-2"/></svg>Training</button> <button data-pane="training" type="button"><svg viewBox="0 0 24 24"><path d="M3 5l9-2 9 2v11l-9 2-9-2z"/><path d="M12 3v13"/><path d="M9 11l3 2 3-2"/></svg>Training</button>
<a href="/api/my/polhunter" id="polhunterNav" title="Missions that pay POL" hidden><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 3v3M12 18v3M3 12h3M18 12h3"/><circle cx="12" cy="12" r="3"/></svg>PolHunter</a>
<button data-pane="wallet" type="button"><svg viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18"/><circle cx="16.5" cy="14.5" r="1.4"/></svg>Wallet</button> <button data-pane="wallet" type="button"><svg viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18"/><circle cx="16.5" cy="14.5" r="1.4"/></svg>Wallet</button>
<button data-pane="profile" type="button"><svg viewBox="0 0 24 24"><circle cx="12" cy="8.5" r="3.6"/><path d="M4.5 20c1.6-3.6 4.2-5.2 7.5-5.2s5.9 1.6 7.5 5.2"/></svg>Profile</button> <button data-pane="profile" type="button"><svg viewBox="0 0 24 24"><circle cx="12" cy="8.5" r="3.6"/><path d="M4.5 20c1.6-3.6 4.2-5.2 7.5-5.2s5.9 1.6 7.5 5.2"/></svg>Profile</button>
</nav> </nav>
@@ -172,6 +173,7 @@
<main class="bo-content"> <main class="bo-content">
<div class="pane" id="pane-overview"> <div class="pane" id="pane-overview">
<div class="card" id="phLaunch" hidden></div>
<div class="card" id="phReturn" hidden></div> <div class="card" id="phReturn" hidden></div>
<div class="card gs" id="gsCard" hidden> <div class="card gs" id="gsCard" hidden>
<div class="card-head"><h3>Getting started</h3><span class="sub" id="gsSub"></span></div> <div class="card-head"><h3>Getting started</h3><span class="sub" id="gsSub"></span></div>
@@ -1038,7 +1040,7 @@
<script src="/assets/common.js?v=20260916a"></script> <script src="/assets/common.js?v=20260916a"></script>
<script src="/assets/wallet.js?v=20260911a"></script> <script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20260911a"></script> <script src="/assets/promo.js?v=20260911a"></script>
<script src="/assets/my.js?v=20260920b"></script> <script src="/assets/my.js?v=20260921b"></script>
<script src="/assets/chat.js?v=20260907l"></script> <script src="/assets/chat.js?v=20260907l"></script>
</body> </body>
</html> </html>