PassiveDrip moves from Games to an Earn-tab card (it is an earning site); members see it when site config passivedripLive=on, admin preview until then
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -774,7 +774,7 @@
|
||||
// member ads: a fresh text ad in the strip under the title, and a banner at the foot of the pane
|
||||
IAP.adSlot('text', 'adStripTop');
|
||||
if ($('adSlotPane-' + name)) IAP.adSlot('banner', 'adSlotPane-' + name);
|
||||
if (name === 'earn') setEarnSub(earnSub); // refresh whichever sub-tab is active
|
||||
if (name === 'earn') { setEarnSub(earnSub); loadPdCard(); } // refresh whichever sub-tab is active; PassiveDrip card (2026-10-01)
|
||||
else if (vidState.token) stopVideo();
|
||||
if (name === 'profile') loadLineBanner();
|
||||
if (name === 'line') { buildLineJump(); loadLineage(); loadUplineMessages(); loadCoach(); loadLinkStats(); loadProspects(); }
|
||||
@@ -1639,6 +1639,13 @@
|
||||
launchReveal(); setInterval(launchReveal, 30000);
|
||||
// came from PolHunter (iap.return cookie): one card at the top of the Overview that sends them back
|
||||
// Games hub (2026-10-01): one card per game, the player's own progress where the game reports it
|
||||
// PassiveDrip, our earning site: a card on the Earn tab (not a game, Marty 2026-10-01)
|
||||
async function loadPdCard() {
|
||||
const card = $('pdCard'); if (!card) return;
|
||||
let j = null; try { j = await (await fetch('/api/my/passivedrip/card')).json(); } catch (e) {}
|
||||
if (!j || !j.show) { card.hidden = true; return; }
|
||||
card.hidden = false; $('pdPre').hidden = !j.preview; $('pdLine').textContent = j.line || '';
|
||||
}
|
||||
async function loadGames() {
|
||||
const el = $('gamesGrid'); if (!el) return;
|
||||
let g = null; try { g = await (await fetch('/api/my/games')).json(); } catch (e) {}
|
||||
|
||||
+10
-1
@@ -613,6 +613,15 @@
|
||||
<div id="fbankDays" style="display:flex;flex-wrap:wrap;gap:6px"></div>
|
||||
<p class="small" style="margin:10px 0 0" id="fbankToday"></p>
|
||||
</div>
|
||||
<div class="card" id="pdCard" hidden style="display:flex;gap:14px;align-items:center;flex-wrap:wrap">
|
||||
<img src="/assets/passivedrip-card.svg" alt="" style="width:140px;max-width:100%;border-radius:10px">
|
||||
<div style="flex:1;min-width:220px">
|
||||
<h3 style="margin:0 0 4px">More ways to earn: PassiveDrip <span class="badge amber" id="pdPre" hidden>preview, not live</span></h3>
|
||||
<p class="small muted" style="margin:0 0 6px">Our earning site. Claim the faucet, view paid-to-click ads and roll the daily bonus for coins. Payouts go in POL to your wallet automatically at 2,000 coins ($1). One tap signs you in with this account, no new password.</p>
|
||||
<p class="small" style="margin:0 0 8px" id="pdLine"></p>
|
||||
<a class="btn" href="/api/my/passivedrip">Open PassiveDrip</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="earn-sub" id="earn-watch">
|
||||
<div class="card">
|
||||
<h3>Earn credits by viewing ads</h3>
|
||||
@@ -1099,7 +1108,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=20260929c"></script>
|
||||
<script src="/assets/my.js?v=20261001b"></script>
|
||||
<script src="/assets/my.js?v=20261001c"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1255,8 +1255,6 @@ function GAMES() {
|
||||
art: DR_URL() + '/badges/ch5.jpg', play: '/api/my/driprunner', pays: 'POL to your wallet at 0.25', progress: drProgress },
|
||||
{ slug: 'polhunter', name: 'PolHunter', tag: 'Scavenger hunt', blurb: 'Hunt hidden codes on sites across the network. Every find drips POL straight to your wallet.',
|
||||
art: 'https://polhunter.com/img/hero-800.webp', play: '/api/my/polhunter', pays: 'POL per find' },
|
||||
{ slug: 'passivedrip', name: 'PassiveDrip', tag: 'Faucet + games', blurb: 'Claim the faucet, view paid-to-click ads, roll the bonus and play the mini games for coins. One tap signs you in with this account, no new password.',
|
||||
art: '/assets/passivedrip-card.svg', play: '/api/my/passivedrip', cta: 'Open', pays: 'POL to your wallet at 2,000 coins ($1)', progress: pdProgress },
|
||||
];
|
||||
}
|
||||
// -- PassiveDrip hand-off (2026-10-01): same token shape as Drip Runner, its own secret (PD_SSO_SECRET, also stored in
|
||||
@@ -2469,6 +2467,18 @@ const server = http.createServer(async (req, res) => {
|
||||
sponsorRef: (acct && acct.sponsorRef) || null, joinedRef: (acct && acct.joinedRef) || null, joinedAt: (acct && acct.created) || null }); // the game credits referrals to the IAP sponsor
|
||||
res.writeHead(302, { Location: DR_URL() + '/auth?t=' + tok, 'Cache-Control': 'no-store', 'Set-Cookie': 'iap.return=; Path=/; SameSite=Lax; Max-Age=0' + (IS_PROD ? '; Secure' : '') }); return res.end();
|
||||
}
|
||||
// -- PassiveDrip card on the Earn tab (Marty, 2026-10-01: "It's an earning site", not a game). Members see it when
|
||||
// site config passivedripLive is 'on'; until then only the admin sees it, marked preview.
|
||||
if (p === '/api/my/passivedrip/card' && req.method === 'GET') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
const live = String(siteConfig().passivedripLive || 'off') === 'on';
|
||||
const admin = !!(ADMIN_EMAIL && String(s.email).toLowerCase() === ADMIN_EMAIL);
|
||||
if ((!live && !admin) || PD_SECRET().length < 32) return json(res, 200, { show: false });
|
||||
const acct = await accounts.byEmail(s.email); const memberId = (acct && acct.memberId) || s.memberId || 0;
|
||||
let progress = null; try { progress = await pdProgress(memberId, s.email); } catch (e) {}
|
||||
return json(res, 200, { show: true, preview: !live, line: progress && progress.line || null });
|
||||
}
|
||||
// -- PassiveDrip hand-off (2026-10-01): sign the member across; PassiveDrip verifies with the shared secret.
|
||||
// wallet = the signature-verified main wallet (accounts.linkWallet runs only after /api/auth/verify), offered there, never imposed.
|
||||
if (p === '/api/my/passivedrip' && req.method === 'GET') {
|
||||
|
||||
Reference in New Issue
Block a user