# 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