In-game sign-in carries the paid-traffic source: joinedRef = <game host>/<src>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-03 11:30:23 -05:00
parent 0112422c72
commit 0fd67b407a
2 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -30,7 +30,7 @@
function mount(el, opt) {
styleOnce(); opt = opt || {};
var game = opt.game, ref = String(opt.ref || '').toLowerCase().replace(/[^a-z0-9_]/g, '').slice(0, 40);
var game = opt.game, ref = String(opt.ref || '').toLowerCase().replace(/[^a-z0-9_]/g, '').slice(0, 40), src = String(opt.src || '').toLowerCase().replace(/[^a-z0-9_.-]/g, '').slice(0, 30);
var fts = Date.now(), email = '', newsletter = true, resendAt = 0, timer = null;
var onToken = opt.onToken || function (t) { location.href = '/auth?t=' + encodeURIComponent(t); };
el.classList.add('iapsi');
@@ -60,7 +60,7 @@
if (f && f.email) { email = String(f.email.value || '').trim(); newsletter = !!(f.nl && f.nl.checked); }
if (!/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(email)) return err('Enter the email you use (or want to use) for InstantAdPay.');
err(''); busy(true);
post('/api/game/auth/start', { game: game, email: email, ref: ref, fts: fts, hp_field_x9: (f && f.hp_field_x9 && f.hp_field_x9.value) || '', pick: pick || '', dev: devId() }).then(function (r) {
post('/api/game/auth/start', { game: game, email: email, ref: ref, src: src, fts: fts, hp_field_x9: (f && f.hp_field_x9 && f.hp_field_x9.value) || '', pick: pick || '', dev: devId() }).then(function (r) {
busy(false);
if (r.challenge) return stepChallenge(r.challenge, r.error);
if (r.ok) { resendAt = Date.now() + 60000; return stepCode(r.devCode); }
@@ -94,7 +94,7 @@
var f = el.querySelector('form'); var code = String((f && f.code && f.code.value) || '').trim();
if (!/^\d{6}$/.test(code)) return err('Enter the 6 digits from the email.');
err(''); busy(true);
post('/api/game/auth/verify', { game: game, email: email, code: code, ref: ref, newsletter: newsletter, dev: devId() }).then(function (r) {
post('/api/game/auth/verify', { game: game, email: email, code: code, ref: ref, src: src, newsletter: newsletter, dev: devId() }).then(function (r) {
busy(false);
if (r.ok) { clearInterval(timer); return done(r); }
if (/expired|too many/i.test(r.error || '')) { clearInterval(timer); return stepEmail(r.error); }