# 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')