diff --git a/public/play.html b/public/play.html index baaabc6..ccfd60c 100644 --- a/public/play.html +++ b/public/play.html @@ -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
connecting…
+
InstantAdPay dashboard · tester briefing
@@ -163,6 +165,7 @@ canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch + diff --git a/public/play.js b/public/play.js index be33228..129409d 100644 --- a/public/play.js +++ b/public/play.js @@ -60,6 +60,7 @@ function lobby() { $('lPool').innerHTML = 'POL pool ' + f3(POOL.available) + ' · today’s cap left ' + f3(POOL.capLeft) + ' · a chapter drip is ' + f3(POOL.dripPol) + ''; $('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 = 'Playing as a guest · sign in to keep your progress and collect POL'; diff --git a/server.js b/server.js index ec0f98b..a955f09 100644 --- a/server.js +++ b/server.js @@ -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) { diff --git a/tools/patch_game_strip.py b/tools/patch_game_strip.py new file mode 100644 index 0000000..424a4b1 --- /dev/null +++ b/tools/patch_game_strip.py @@ -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', [ + ('
', + '\n'), + ('[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')