Drip Runner return path: signed-out hand-off sets iap.return=driprunner and the email sign-in answers next=/api/my/driprunner (straight back into the game); refuel page dead ends keep a Back to Drip Runner button
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -2632,6 +2632,7 @@
|
||||
$('mcVerifyBtn').addEventListener('click', busy($('mcVerifyBtn'), async () => {
|
||||
const r = await api('/api/auth/email/verify', { email: $('mcEmail').value, code: $('mcCode').value, newsletter: !!($('nlOptin') && $('nlOptin').checked) });
|
||||
IAP.status('You are in.', 'ok');
|
||||
if (r.next && !r.created) { location.href = r.next; return; } // came from Drip Runner: straight back into the game
|
||||
if (r.created && !(r.account && r.account.username)) await showOnboard(); // pick a username first
|
||||
if (!(await showGauntlet())) await showLoginAd(); // welcome tour outranks the login ad
|
||||
await render();
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
'use strict';
|
||||
var $ = function (id) { return document.getElementById(id); };
|
||||
var q = new URLSearchParams(location.search); var tok = q.get('t') || '';
|
||||
var nonce = ''; try { nonce = JSON.parse(atob(tok.split('.')[0].replace(/-/g, '+').replace(/_/g, '/'))).nonce || ''; } catch (e) {}
|
||||
var nonce = '', tokRet = ''; try { var claims = JSON.parse(atob(tok.split('.')[0].replace(/-/g, '+').replace(/_/g, '/'))); nonce = claims.nonce || ''; tokRet = claims.ret || ''; } catch (e) {}
|
||||
// every dead end on this page keeps a way back to the run (Marty, 2026-09-30)
|
||||
var gameHome = tokRet ? tokRet.split('?')[0] : 'https://driprunner.saasy.top/play';
|
||||
var ret = null, dwell = 8, left = 8, timer = null, done = false;
|
||||
function msg(title, text, backUrl) { $('rfFrame').innerHTML = '<div class="rf-msg" style="background:#0b1020;height:100%"><h1>' + title + '</h1><p>' + text + '</p></div>'; $('rfDone').hidden = true; $('rfCheck').hidden = true; if (backUrl) { var b = $('rfBack'); b.hidden = false; b.onclick = function () { location.href = backUrl; }; } }
|
||||
function msg(title, text, backUrl) { $('rfFrame').innerHTML = '<div class="rf-msg" style="background:#0b1020;height:100%"><h1>' + title + '</h1><p>' + text + '</p></div>'; $('rfDone').hidden = true; $('rfCheck').hidden = true; var b = $('rfBack'); b.hidden = false; var to = backUrl || gameHome; b.textContent = backUrl ? 'Back to the game' : 'Back to Drip Runner'; b.onclick = function () { location.href = to; }; }
|
||||
function esc(s) { return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) { return { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]; }); }
|
||||
function api(p, body) { return fetch(p, body ? { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) } : {}).then(function (r) { return r.json(); }); }
|
||||
function ring() { $('rfN').textContent = left; $('rfRing').style.setProperty('--p', ((dwell - left) / dwell * 100) + '%'); }
|
||||
|
||||
Reference in New Issue
Block a user