From 36ef50830c1c0a570fe87d79ebc524937ac54249 Mon Sep 17 00:00:00 2001 From: martbost Date: Wed, 23 Sep 2026 07:57:21 -0500 Subject: [PATCH] Board: the referral explainer plays on the card A 46 second video on how the referral mission works, on the card itself rather than on a page nobody opens. It plays in place the way the teaser does on the home page. Co-Authored-By: Claude Opus 5 --- public/app.html | 4 ++-- public/app.js | 15 +++++++++++++++ public/style.css | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/public/app.html b/public/app.html index 8c50e69..a817f82 100644 --- a/public/app.html +++ b/public/app.html @@ -5,7 +5,7 @@ Your board · PolHunter - +
@@ -47,6 +47,6 @@
Rewards are for completed missions, not income. The daily pool is limited; when it is spent, claims close until midnight Central. Cryptocurrency involves risk of loss.
- + diff --git a/public/app.js b/public/app.js index b19bd0a..57e1827 100644 --- a/public/app.js +++ b/public/app.js @@ -64,8 +64,22 @@ + '

' + today + ' brought today ' + '· ' + total + ' all time · ' + rf.earnedPol + ' POL earned

' + (people ? '
' + people + '
' : '

Nobody yet. One message is all it takes.

') + + '
' + ''; } + // the explainer plays in place, the way the teaser does on the home page + function wireRefVideo() { + const b = $('refPlay'); if (!b) return; + b.addEventListener('click', () => { + const host = b.parentElement; + const v = document.createElement('video'); + v.controls = true; v.autoplay = true; v.playsInline = true; v.className = 'ref-video'; + v.poster = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/training/polhunter-bring-a-hunter.jpg?v=20260923a'; + v.src = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/training/polhunter-bring-a-hunter.mp4?v=20260923a'; + host.innerHTML = ''; host.appendChild(v); + v.play().catch(() => {}); + }); + } const IAP = 'https://instantadpay.com'; function until(ms) { const s = Math.max(0, Math.round((ms - Date.now()) / 60000)); const h = Math.floor(s / 60), m = s % 60; return h ? h + 'h ' + m + 'm' : m + 'm'; } // no wallet on the InstantAdPay account yet: the three steps, in place of the missions @@ -105,6 +119,7 @@ else $('missions').innerHTML = (pool.spent ? '
Today\u2019s POL pool is spent. No more claims today. Claims reopen at midnight Central' + (pool.resetsAt ? ', in ' + until(pool.resetsAt) : '') + '.
' : '') + (board.missions.length ? board.missions.map(card).join('') : '

No missions are open right now. Check back soon.

'); if ($('refSlot')) $('refSlot').innerHTML = board.me.wallet ? referralCard() : ''; + wireRefVideo(); const rc = $('refCopy'); if (rc) rc.addEventListener('click', async () => { const v = $('refLink').value; diff --git a/public/style.css b/public/style.css index a28c96f..9a81725 100644 --- a/public/style.css +++ b/public/style.css @@ -134,3 +134,5 @@ textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(-- #refSlot .ref-card p,#refSlot .ref-card .codebox{grid-column:1} #refSlot .ref-card .ref-list,#refSlot .ref-card>p:last-child{grid-column:2;grid-row:2/span 5;align-self:stretch;margin-top:0;border-top:0;border-left:1px solid var(--edge);padding-left:22px} } +.ref-watch{margin-top:14px} +.ref-video{width:100%;max-width:560px;border-radius:14px;display:block;background:#000}