SpellWheel hookups: in-game sign-in (game 'spellwheel', SW_SSO_SECRET), one-tap /api/my/spellwheel, sponsor-visit hints through the shared refuel flow (sw-hint receipts)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,10 +32,10 @@
|
||||
function answer(i) {
|
||||
api('/api/refuel/done', { n: nonce, answer: i }).then(function (r) {
|
||||
if (r.error) { if (r.retry) return challenge(); $('rfHint').textContent = r.error; $('rfCheck').hidden = true; return; }
|
||||
done = true; $('rfCheck').hidden = true; var gk = GAME === 'Gem Kingdom', ch = GAME === 'ClutterHunt';
|
||||
$('rfHint').textContent = gk ? 'Visit counted. Your heroes are back on their feet.' : ch ? 'Visit counted. Your hint is ready.' : 'Visit counted. Your tank is full.';
|
||||
done = true; $('rfCheck').hidden = true; var gk = GAME === 'Gem Kingdom', ch = GAME === 'ClutterHunt', sw = GAME === 'SpellWheel';
|
||||
$('rfHint').textContent = gk ? 'Visit counted. Your heroes are back on their feet.' : (ch || sw) ? 'Visit counted. Your hint is ready.' : 'Visit counted. Your tank is full.';
|
||||
if (gk && inGame) { try { window.parent.postMessage({ gkContinue: nonce, ok: true }, '*'); } catch (e) {} }
|
||||
var b = $('rfDone'); b.disabled = false; b.textContent = gk ? 'Back to the battle' : ch ? 'Back to the room' : 'Back to the run'; b.onclick = function () { location.href = r.ret; };
|
||||
var b = $('rfDone'); b.disabled = false; b.textContent = gk ? 'Back to the battle' : ch ? 'Back to the room' : sw ? 'Back to the puzzle' : 'Back to the run'; b.onclick = function () { location.href = r.ret; };
|
||||
setTimeout(function () { location.href = r.ret; }, 1200);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,6 +37,6 @@ a.rf-open{color:#8FF0FF;font-size:12px}
|
||||
<button class="rf-btn" id="rfDone" type="button" disabled>Waiting…</button>
|
||||
<button class="rf-btn ghost" id="rfBack" type="button" hidden>Back to the game</button>
|
||||
</div>
|
||||
<script src="/assets/refuel.js?v=20261003h"></script>
|
||||
<script src="/assets/refuel.js?v=20261004sw"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user