In-game sign-in: /signin runs the InstantAdPay kit (no trip to InstantAdPay), CSP admits instantadpay.com, dashboard and Level up links open InstantAdPay signed in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-03 10:02:47 -05:00
parent dd00cb1b57
commit 9c693fcf63
7 changed files with 95 additions and 10 deletions
+2 -2
View File
@@ -47,7 +47,7 @@
<h1>Hop the network.<br><em>Get paid in POL.</em></h1>
<p class="lead">A fast little runner game for InstantAdPay members. Grab gold drips, dodge the bots, clear chapters. Your first clear of every chapter drips POL into your game balance, and it pays out to the wallet on your InstantAdPay account.</p>
<div class="cta">
<a class="btn" href="https://instantadpay.com/api/my/driprunner">Play with InstantAdPay</a>
<a class="btn" href="/signin">Play with InstantAdPay</a>
<a class="btn ghost" href="/play">Try a run first</a>
</div>
<p class="muted">New to InstantAdPay? The first button signs you up free with just your email, then drops you straight into the game.</p>
@@ -90,7 +90,7 @@
</div>
<div class="cta" style="margin-top:26px">
<a class="btn" href="https://instantadpay.com/api/my/driprunner">Play with InstantAdPay</a>
<a class="btn" href="/signin">Play with InstantAdPay</a>
<a class="btn ghost" href="/play">Try a run first</a>
</div>
<p class="fine">Drip Runner pays small amounts of POL for play that the game can verify. Amounts depend on the pool, which is funded by the ad visits players make, and can change. Nothing here is a promise of income. One account per person. Part of the Crypto Team Build Network, alongside InstantAdPay and PolHunter.</p>
+1
View File
@@ -162,6 +162,7 @@ canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch
<button class="btn ghost" id="bLobby4" type="button">Back</button>
</div></div>
</div></div>
<script src="https://instantadpay.com/assets/game-signin.js?v=20261003a" async></script>
<script src="/spawn.js"></script>
<script src="/play.js"></script>
</body>
+6 -4
View File
@@ -59,9 +59,11 @@ function lobby() {
$('lChap').textContent = P.chapter; $('lDrips').textContent = P.bank.toLocaleString(); $('lPol').textContent = f3(BAL.unpaid);
$('lPool').innerHTML = 'POL pool <b>' + f3(POOL.available) + '</b> · today’s cap left <b>' + f3(POOL.capLeft) + '</b> · a chapter drip is <b>' + f3(POOL.dripPol) + '</b>';
$('lIap').href = IAP + '/my'; $('bLevel').href = IAP + '/my#buy'; tip('lTip');
// signed in through the game: these open InstantAdPay already signed in (in-game sign-in pass, 2026-10-03)
[['lIap', 'overview'], ['bLevel', 'buy']].forEach(function (x) { var a = $(x[0]); if (a && !a.dataset.pass) { a.dataset.pass = 1; a.addEventListener('click', function (ev) { if (window.IAPSignin && IAPSignin.hasPass()) { ev.preventDefault(); IAPSignin.enter(x[1]); } }); } });
if (ME.guest) {
$('lMember').innerHTML = '<i class="no"></i>Playing as a guest · sign in to keep your progress and collect POL';
$('bSignin').hidden = false; $('bSignin').href = ME_EXTRA.signin || (IAP + '/api/my/driprunner'); $('lShare').hidden = true;
$('bSignin').hidden = false; $('bSignin').href = ME_EXTRA.signin || '/signin'; $('lShare').hidden = true;
} else {
$('lMember').innerHTML = '<i class="' + (ME.wallet ? '' : 'no') + '"></i>InstantAdPay · ' + (ME.username ? '@' + ME.username : '#' + ME.memberId) + ' · ' + (ME.wallet ? ME.wallet.slice(0, 6) + '…' + ME.wallet.slice(-4) : 'no wallet on file');
$('bSignin').hidden = true;
@@ -143,7 +145,7 @@ function cleared() {
$('cBig').innerHTML = '+' + f3(c.pol) + '<small>POL</small>'; $('cBig').classList.toggle('dim', !c.pol);
var why = { paid: 'First clear, verified. Added to your game balance.', replay: c.first ? 'Verified.' : 'You cleared this one before. Only the first clear pays.', pool: 'The POL pool is empty right now. Refuel visits fill it, so this clear counts but pays nothing.', cap: 'Today’s pool cap is spent. Chapter counts, no POL today.', flagged: 'This run was flagged by the server check, so it pays nothing.', guest: 'You are playing as a guest. Sign in with InstantAdPay and this clear pays ' + f3(POOL.dripPol) + ' POL into your balance. Your progress comes with you.' };
$('bShareClear').hidden = !!ME.guest || !ME_EXTRA.share; $('bShareClear').dataset.text = 'I just cleared Chapter ' + c.chapter + ' in Drip Runner' + (c.pol ? ' and it paid ' + f3(c.pol) + ' POL' : '') + '. Hop the network, dodge the bots:';
$('bClearSignin').hidden = !ME.guest; if (ME.guest) $('bClearSignin').href = ME_EXTRA.signin || (IAP + '/api/my/driprunner');
$('bClearSignin').hidden = !ME.guest; if (ME.guest) $('bClearSignin').href = ME_EXTRA.signin || '/signin';
$('cText').textContent = why[c.reason] || ''; $('cChip').className = 'chip ' + (c.pol ? 'ok' : 'sig'); $('cChip').textContent = (c.pol ? 'verified' : c.reason) + ' · ' + tm + ' play time';
R.chapter = c.next; R.goal = c.nextGoal; R.chapDrips = 0; if (r.pool != null) POOL.available = r.pool;
tip('cTip'); setTimeout(function () { show('ovClear'); }, 500);
@@ -165,7 +167,7 @@ function snapshot(nonce) {
}
$('bRefuel').addEventListener('click', function () {
if (!R) return;
if (ME.guest) { location.href = ME_EXTRA.signin || (IAP + '/api/my/driprunner'); return; } // guests sign in first; their progress follows them
if (ME.guest) { location.href = ME_EXTRA.signin || '/signin'; return; } // guests sign in first; their progress follows them
$('bRefuel').disabled = true;
api('/api/refuel/start', { runId: R.id }).then(function (r) {
$('bRefuel').disabled = false;
@@ -252,7 +254,7 @@ loadMe().then(function () {
if (q.get('collected')) { history.replaceState(null, '', '/play'); setTimeout(function () { toast('Signed in. Your guest clears paid ' + q.get('collected') + ' drip' + (q.get('collected') === '1' ? '' : 's') + ' into your balance.'); }, 600); }
lobby();
}).catch(function (r) {
var b = $('loadBtn'); b.hidden = false; b.href = (r && (r.signin || r.iap)) || IAP + '/api/my/driprunner';
var b = $('loadBtn'); b.hidden = false; b.href = (r && (r.signin || r.iap)) || '/signin';
if (r && r.guestOk) { // came through a share or tester link: play first, sign in later
$('loadTitle').textContent = 'Ready to run'; $('loadText').textContent = 'Play a run right now, no sign-in. Sign in with InstantAdPay when you want to keep your progress, refuel, and collect POL.';
b.textContent = 'Sign in with InstantAdPay'; b.className = 'btn ghost'; var g = $('loadGuest'); g.hidden = false;
+28
View File
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="robots" content="noindex,nofollow">
<title>Sign in · Drip Runner</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&display=swap">
<link rel="stylesheet" href="/site.css">
<style>
html{background:#050912}
.si{max-width:420px;margin:0 auto;padding-top:36px;display:grid;gap:18px}
.si .logo{font-size:30px;text-align:center}
.si .card{--si-accent:var(--cyan);--si-accent-ink:#04121a;--si-ink:var(--ink);--si-muted:var(--ink2);--si-field:rgba(5,9,18,.6);--si-line:var(--line);--si-font:var(--body);--si-bad:#ff7a9c}
.si .card h2{margin:0}
.si .back{text-align:center;font-size:14px}.si .back a{color:var(--muted)}
</style>
</head>
<body>
<main class="si">
<a href="/" style="text-decoration:none"><p class="logo">Drip <span>Runner</span></p></a>
<section class="card" id="iapSignin"><p>Loading sign-in…</p></section>
<p class="back"><a href="/play">Keep playing as a guest</a></p>
</main>
<script src="https://instantadpay.com/assets/game-signin.js?v=20261003a"></script>
<script src="/signin.js"></script>
</body>
</html>
+8
View File
@@ -0,0 +1,8 @@
// In-game sign-in (2026-10-03): the InstantAdPay kit runs on this page, so a player signs in (or opens a free
// InstantAdPay account) without leaving Drip Runner. The kit hands back the game token; /auth opens it as before.
(function () {
var box = document.getElementById('iapSignin');
if (!window.IAPSignin) { box.innerHTML = '<p>Sign-in could not load. <a href="https://instantadpay.com/api/my/driprunner" style="color:var(--cyan)">Sign in on InstantAdPay instead</a>.</p>'; return; }
var m = /(?:^|;\s*)dr\.ref=([^;]+)/.exec(document.cookie || ''); // the share link a guest arrived on: their sponsor
IAPSignin.mount(box, { game: 'driprunner', ref: m ? decodeURIComponent(m[1]) : '', title: 'Sign in to run', oneTap: IAPSignin.origin + '/api/my/driprunner' });
})();