Games tab: PolyWarriors coming-soon card (opens Monday Oct 12); sign-in kit's one-tap link carries the inviter's ref
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
function ls(k, v) { try { if (v === undefined) return localStorage.getItem(k); if (v === null) localStorage.removeItem(k); else localStorage.setItem(k, v); } catch (e) { return null; } }
|
||||
function devId() { var d = ls(DEV_KEY); if (!/^[a-f0-9]{32}$/.test(d || '')) { d = ''; var a = new Uint8Array(16); (window.crypto || window.msCrypto).getRandomValues(a); for (var i = 0; i < 16; i++) d += ('0' + a[i].toString(16)).slice(-2); ls(DEV_KEY, d); } return d; }
|
||||
function getPass() { try { var p = JSON.parse(ls(PASS_KEY) || 'null'); return p && p.p && p.exp > Date.now() ? p : null; } catch (e) { return null; } }
|
||||
// the one-tap link carries the inviter's ref too, so a new player who taps it still gets their sponsor (2026-10-05)
|
||||
function oneTapUrl(opt) { var u = String(opt.oneTap || ''), r = String(opt.ref || '').toLowerCase().replace(/[^a-z0-9_]/g, '').slice(0, 20); if (!r || /[?&]ref=/.test(u)) return u; return u + (u.indexOf('?') < 0 ? '?' : '&') + 'ref=' + encodeURIComponent(r); }
|
||||
function esc(s) { return String(s == null ? '' : s).replace(/[&<>"]/g, function (c) { return { '&': '&', '<': '<', '>': '>', '"': '"' }[c]; }); }
|
||||
function post(path, body) {
|
||||
return fetch(IAP + path, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body), credentials: 'omit' })
|
||||
@@ -49,7 +51,7 @@
|
||||
+ '<input class="hp" type="text" name="hp_field_x9" tabindex="-1" autocomplete="off" aria-hidden="true">'
|
||||
+ '<label class="ck"><input type="checkbox" name="nl"' + (newsletter ? ' checked' : '') + '><span>Keep me posted with the InstantAdPay newsletter (tips and updates). You can unsubscribe anytime.</span></label>'
|
||||
+ '<div class="err" role="alert"></div><button class="go" type="submit">Send my code</button></form>'
|
||||
+ (opt.oneTap ? '<div class="row"><a class="lk" href="' + esc(opt.oneTap) + '">Already signed in to InstantAdPay here? One tap</a></div>' : '')
|
||||
+ (opt.oneTap ? '<div class="row"><a class="lk" href="' + esc(oneTapUrl(opt)) + '">Already signed in to InstantAdPay here? One tap</a></div>' : '')
|
||||
+ '<p class="fine">By continuing you agree to the InstantAdPay <a href="' + IAP + '/terms" target="_blank" rel="noopener">Terms</a> and <a href="' + IAP + '/privacy" target="_blank" rel="noopener">Privacy</a> policy.</p>';
|
||||
var f = el.querySelector('form'); if (msg) err(msg);
|
||||
f.addEventListener('submit', function (ev) { ev.preventDefault(); send(null); });
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
@@ -1437,6 +1437,9 @@ function GAMES() {
|
||||
// the card with its date and no Play button until `soon.opens` (Central); from then it is an ordinary card, live via gamesLive
|
||||
{ slug: 'spellwheel', name: 'SpellWheel', tag: 'Word game', blurb: 'Swipe the letter wheel to fill the crossword, travel through six cozy places, and solve a new daily puzzle with everyone. Clear levels and chapters to earn POL.',
|
||||
art: '/assets/games/spellwheel-soon.jpg?v=1', play: '/api/my/spellwheel', pays: 'POL for levels, chapters and daily puzzles', soon: { opens: '2026-10-10', label: 'Opens Saturday, Oct 10' } },
|
||||
// PolyWarriors (Marty 2026-10-05: "put Poly Warriors there as well, saying that it's coming next Monday")
|
||||
{ slug: 'polywarriors', name: 'PolyWarriors', tag: 'Cyberpunk fighting', blurb: 'Turn-based fights with collectible low-poly warriors. Recruit fighters born with rare traits, climb the arena, challenge other members, and mint your warriors as NFTs.',
|
||||
art: '/assets/games/polywarriors-soon.jpg?v=1', play: '/api/my/polywarriors', pays: 'POL for first wins over arena rivals', soon: { opens: '2026-10-12', label: 'Opens Monday, Oct 12' } },
|
||||
]);
|
||||
}
|
||||
// each game's member perk (the $5 welcome offer, 2026-10-05) shown on its card
|
||||
|
||||
Reference in New Issue
Block a user