Cross-promo: More games strip from InstantAdPay's shared list (2026-10-03)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-03 10:23:46 -05:00
parent 19b4bf8fbb
commit 305bd435fa
4 changed files with 30 additions and 1 deletions
+3
View File
@@ -35,6 +35,7 @@ canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch
@keyframes pop{0%{transform:translate(-50%,10px) scale(.7)}30%{transform:translate(-50%,0) scale(1.1)}100%{transform:translate(-50%,-30px) scale(1)}}
.mute{position:absolute;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:6;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:rgba(14,23,45,.7);color:var(--ink2);font:700 13px var(--mono);display:grid;place-items:center;cursor:pointer}
.ov{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;justify-content:center;padding:calc(20px + env(safe-area-inset-top,0px)) 18px calc(20px + env(safe-area-inset-bottom,0px));background:rgba(5,9,18,.55);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.moreGames{margin-top:16px;--gs-ink:var(--ink);--gs-muted:var(--ink2);--gs-card:var(--panel2);--gs-line:var(--line);--gs-hot:var(--gold);--gs-font:var(--body)}
[hidden]{display:none!important} /* every element, not just overlays: .btn{display:block} was beating the hidden attribute, so signed-in players still saw "Sign in to keep progress" (Marty, 2026-10-03) */
/* 2026-10-01 (Hugh, iPhone Safari): the lobby is taller than a phone with the browser bar showing, and .phone clips overflow, so the last button sat under the toolbar. Overlays scroll, keep a bottom gap, and center only when they fit. */
.ov{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;justify-content:safe center}
@@ -123,6 +124,7 @@ canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch
<a class="btn" id="bSignin" href="#" hidden style="text-decoration:none;text-align:center">Sign in to keep progress</a>
<div class="shr" id="lShare" hidden><div id="lShareStat"></div><p class="shrHow" id="lShareHow"></p><button class="btn ghost" id="bShare" type="button">Share your link</button></div>
<div class="member" id="lMember"><i></i>connecting…</div>
<div id="moreGames" class="moreGames" hidden></div>
<div class="member" style="margin-top:6px"><a id="lIap" href="https://instantadpay.com/my" style="color:var(--muted)">InstantAdPay dashboard</a> · <a href="/" style="color:var(--muted)">tester briefing</a></div>
</div>
</div>
@@ -163,6 +165,7 @@ canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch
</div></div>
</div></div>
<script src="https://instantadpay.com/assets/game-signin.js?v=20261003a" async></script>
<script src="https://instantadpay.com/assets/game-strip.js?v=20261003a"></script>
<script src="/spawn.js"></script>
<script src="/play.js"></script>
</body>
+1
View File
@@ -60,6 +60,7 @@ function lobby() {
$('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)
if (window.IAPGames && !$('moreGames').dataset.done) { $('moreGames').dataset.done = 1; IAPGames.strip($('moreGames'), { current: 'driprunner', title: 'More games that pay POL' }); } // cross-promo strip (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';
+1 -1
View File
@@ -103,7 +103,7 @@ async function notify(kind, p) {
// ---- helpers ---------------------------------------------------------------------------------
const TYPES = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': 'application/javascript', '.png': 'image/png', '.jpg': 'image/jpeg', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.json': 'application/json', '.webp': 'image/webp', '.mp4': 'video/mp4' };
// instantadpay.com: the in-game sign-in kit (script), its API (connect) and the signed-in nudge form (form-action), 2026-10-03
const CSP = "default-src 'self'; script-src 'self' " + IAP + "; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self' " + IAP + "; frame-ancestors 'none'; form-action 'self' " + IAP;
const CSP = "default-src 'self'; script-src 'self' " + IAP + "; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' " + IAP + "; frame-ancestors 'none'; form-action 'self' " + IAP;
const SEC = { 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': CSP };
function json(res, code, body, extra) { res.writeHead(code, Object.assign({ 'Content-Type': 'application/json', 'Cache-Control': 'no-store' }, SEC, extra || {})); res.end(JSON.stringify(body)); }
function sendFile(res, file, extra) {
+25
View File
@@ -0,0 +1,25 @@
# Cross-promo strip (Marty, 2026-10-03): "More games" in the lobby, from InstantAdPay's shared list.
ROOT = 'D:/Projects/HighRisk/drip-runner/'
def edit(path, pairs):
b = open(ROOT + path, 'rb').read(); crlf = b.count(b'\r\n') > b.count(b'\n') // 2
s = b.decode('utf-8').replace('\r\n', '\n')
for a, r in pairs:
if s.count(a) != 1: raise SystemExit('%s anchor %d: %s' % (path, s.count(a), a[:70]))
s = s.replace(a, r)
if crlf: s = s.replace('\n', '\r\n')
open(ROOT + path, 'wb').write(s.encode('utf-8')); print('patched', path)
edit('server.js', [("img-src 'self' data:; connect-src", "img-src 'self' data: https:; connect-src")]) # other games' share art in the strip
edit('public/play.html', [
('<div class="member" style="margin-top:6px"><a id="lIap"',
'<div id="moreGames" class="moreGames" hidden></div>\n <div class="member" style="margin-top:6px"><a id="lIap"'),
('<script src="https://instantadpay.com/assets/game-signin.js?v=20261003a" async></script>',
'<script src="https://instantadpay.com/assets/game-signin.js?v=20261003a" async></script>\n<script src="https://instantadpay.com/assets/game-strip.js?v=20261003a"></script>'),
('[hidden]{display:none!important}', '.moreGames{margin-top:16px;--gs-ink:var(--ink);--gs-muted:var(--ink2);--gs-card:var(--panel2);--gs-line:var(--line);--gs-hot:var(--gold);--gs-font:var(--body)}\n[hidden]{display:none!important}'),
])
edit('public/play.js', [
(" [['lIap', 'overview'], ['bLevel', 'buy']].forEach(",
" if (window.IAPGames && !$('moreGames').dataset.done) { $('moreGames').dataset.done = 1; IAPGames.strip($('moreGames'), { current: 'driprunner', title: 'More games that pay POL' }); } // cross-promo strip (2026-10-03)\n"
" [['lIap', 'overview'], ['bLevel', 'buy']].forEach("),
])
print('ok')