Files
drip-runner/public/signin.js
T

9 lines
781 B
JavaScript

// 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' });
})();