Promo tools: one Games tab (picker for all 7 games; PolHunter and Spooky Doors kits live inside it; link, share image, posts and 10 banner sizes per game); SpellWheel link fixed to spellwheel.com

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-06 08:16:12 -05:00
parent 5a39b2599f
commit ef8b256172
3 changed files with 86 additions and 38 deletions
+2 -1
View File
@@ -2189,7 +2189,8 @@
if ($('tkGo')) { $('tkGo').addEventListener('click', tkGenerate); $('tkAgain').addEventListener('click', tkGenerate); $('tkCopy').addEventListener('click', async () => { try { await navigator.clipboard.writeText($('tkText').value); IAP.status('Copied.', 'ok'); } catch (e) { $('tkText').select(); } }); $('tkSendBc').addEventListener('click', tkSendBroadcast); }
// promo tools: pill menu switches between posts / swipes / banners / wall / videos
function setPromoSub(name) {
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'polhunter', 'gamebanners', 'spookydoors'];
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'games'];
if (['polhunter', 'spookydoors', 'gamebanners'].includes(name)) name = 'games'; // those tabs live inside Games now (2026-10-06)
if (name === 'toolkit') loadToolkit();
const pill = document.querySelector('.promo-pills [data-promo="' + name + '"]');
if (!ids.includes(name) || !pill || pill.hidden) name = 'posts';
+58 -20
View File
@@ -273,30 +273,68 @@ window.IAPPromo = (function () {
const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img src="' + src + '" alt="' + s + '" style="max-width:100%;height:auto;border-radius:8px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); bg.appendChild(d); }
}
// Game banners (2026-10-06): every network game in 10 standard sizes, hosted on banners.adrotate.xyz, each embed linked to
// the member (PolHunter takes ?r=, the other games ?ref=). Seasonal games stay listed; their banners carry no dates.
const gbs = $('promo-gamebanners');
if (gbs && token && gbs.dataset.filled !== token) {
gbs.dataset.filled = token;
// Games (2026-10-06, Marty: one tab for every game instead of a pill each). A picker drives one panel: games with their own
// kit (PolHunter, Spooky Doors) show it; the rest get link, share image and posts. Every game gets the 10 standard banners
// from banners.adrotate.xyz, each embed linked to the member (PolHunter takes ?r=, the other games ?ref=).
const gms = $('promo-games');
if (gms && token && gms.dataset.filled !== token) {
gms.dataset.filled = token;
const enc = encodeURIComponent, CDN = 'https://banners.adrotate.xyz/game-banners/';
const preLaunch = (y, m, d) => Date.now() < Date.UTC(y, m - 1, d, 5); // before midnight Central on that day
const GAMES = [
{ slug: 'polywarriors', name: 'PolyWarriors', link: 'https://www.polywarriors.com/?ref=' }, { slug: 'gemkingdom', name: 'Gem Kingdom', link: 'https://gemkingdom.app/?ref=' },
{ slug: 'driprunner', name: 'Drip Runner', link: 'https://driprunner.app/?ref=' }, { slug: 'clutterhunt', name: 'ClutterHunt', link: 'https://clutterhunt.com/?ref=' },
{ slug: 'spellwheel', name: 'SpellWheel', link: 'https://spellwheel.app/?ref=' }, { slug: 'spookydoors', name: 'Spooky Doors', link: 'https://spookydoors.com/?ref=' },
{ slug: 'polhunter', name: 'PolHunter', link: 'https://polhunter.com/?r=' }];
{ slug: 'polywarriors', name: 'PolyWarriors', link: 'https://www.polywarriors.com/?ref=', img: 'https://www.polywarriors.com/og-polywarriors.jpg', sub: 'cyberpunk battler with NFT warrior cards',
posts: [
{ name: 'Short post', text: 'PolyWarriors is a free cyberpunk battler. Recruit warriors that are each born with their own traits, fight 12 rivals, and challenge other members. Your first warrior mints to your wallet as an NFT, free.' + (preLaunch(2026, 10, 12) ? ' Opens Monday Oct 12.' : '') + ' {L}' },
{ name: 'Friendly post', text: 'I have been playing PolyWarriors, a turn-based fighting game with a cyberpunk look. Every warrior is one of a kind, and you can mint yours and battle other members. Free to play: {L}' }] },
{ slug: 'gemkingdom', name: 'Gem Kingdom', link: 'https://gemkingdom.app/?ref=', img: 'https://gemkingdom.app/fantasy/og-gemkingdom.jpg', sub: 'fantasy match-3 with boss battles',
posts: [
{ name: 'Short post', text: 'Gem Kingdom is a free fantasy match-3. Lead three heroes, beat the Goblin King’s bosses and rebuild your village. Boss wins come with POL rewards. Play here: {L}' },
{ name: 'Friendly post', text: 'Looking for a game to unwind with? Gem Kingdom is match-3 with a story: forge weapons, collect stars and climb the leaderboard. Free in your browser: {L}' }] },
{ slug: 'driprunner', name: 'Drip Runner', link: 'https://driprunner.app/?ref=', img: 'https://driprunner.app/og-driprunner.jpg', sub: 'quick runner game',
posts: [
{ name: 'Short post', text: 'Drip Runner is a quick free runner game. Hop the network, dodge the drones, clear chapters and refuel for POL rewards. Play in your browser: {L}' },
{ name: 'Friendly post', text: 'Got two minutes? Drip Runner is a fast little runner game I keep coming back to. See how far you get: {L}' }] },
{ slug: 'clutterhunt', name: 'ClutterHunt', link: 'https://clutterhunt.com/?ref=', img: 'https://clutterhunt.com/og-clutterhunt.jpg', sub: 'seasonal hidden-object game',
posts: [
{ name: 'Short post', text: 'ClutterHunt is a free hidden-object game. Six rooms to search, a clock running, and everything moves each time you play. Can you three-star Expert? {L}' },
{ name: 'Friendly post', text: 'If you like spot-the-object puzzles, try ClutterHunt. Free in your browser, with POL rewards for clearing rooms: {L}' }] },
{ slug: 'spellwheel', name: 'SpellWheel', link: 'https://spellwheel.com/?ref=', img: 'https://spellwheel.com/og-spellwheel.jpg', sub: 'letter-wheel word game',
posts: [
{ name: 'Short post', text: 'SpellWheel is a free word game. Swipe the letters on the wheel to fill the grid, one place at a time.' + (preLaunch(2026, 10, 10) ? ' Opens Saturday Oct 10.' : '') + ' {L}' },
{ name: 'Friendly post', text: 'Word game fans, this one is for you. SpellWheel: swipe letters, fill the grid, and earn POL rewards as you clear levels. Free in your browser: {L}' }] },
{ slug: 'spookydoors', name: 'Spooky Doors', link: 'https://spookydoors.com/?ref=', kit: 'promo-spookydoors', seasonal: true },
{ slug: 'polhunter', name: 'PolHunter', link: 'https://polhunter.com/?r=', kit: 'promo-polhunter' }];
const SIZES = [['728x90', 'Leaderboard'], ['468x60', 'Banner'], ['320x50', 'Mobile banner'], ['300x250', 'Medium rectangle'], ['336x280', 'Large rectangle'], ['250x250', 'Square'], ['125x125', 'Button'], ['160x600', 'Wide skyscraper'], ['120x600', 'Skyscraper'], ['300x600', 'Half page']];
let cur = GAMES[0];
const avail = { spookydoors: false }; // seasonal: the Spooky Doors kit says whether its season is showing
const list = () => GAMES.filter(g => avail[g.slug] !== false);
let cur = null; try { cur = localStorage.getItem('iap.gmGame'); } catch (e) {}
const draw = () => {
const link = cur.link + enc(token); $('gbLink').textContent = link;
$('gbLinkCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
$('gbGames').innerHTML = GAMES.map(g => '<button class="chip-t' + (g === cur ? ' on' : '') + '" type="button" data-gb="' + g.slug + '">' + esc(g.name) + '</button>').join('');
const L = list(); const g = L.find(x => x.slug === cur) || L[0]; cur = g.slug;
try { localStorage.setItem('iap.gmGame', cur); } catch (e) {}
$('gmPick').innerHTML = L.map(x => '<button class="chip-t' + (x === g ? ' on' : '') + '" type="button" data-gm="' + x.slug + '">' + esc(x.name) + '</button>').join('');
const link = g.link + enc(token);
GAMES.forEach(x => { if (x.kit && $(x.kit)) $(x.kit).hidden = x !== g; });
$('gmGeneric').hidden = !!g.kit;
if (!g.kit) {
$('gmTitle').textContent = g.name; $('gmSub').textContent = g.sub || '';
$('gmLink').textContent = link;
$('gmLinkCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const posts = g.posts.map(p => ({ name: p.name, text: p.text.replace('{L}', link) })), hook = posts[0].text.replace(link, '').trim();
const sh = $('gmShare'); sh.innerHTML = '';
[linkBtn('https://x.com/intent/tweet?text=' + enc(posts[0].text), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(hook), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(posts[0].text), 'WhatsApp')].forEach(b => sh.appendChild(b));
const gi = $('gmImg'); gi.hidden = true; gi.onload = () => { if (gi.dataset.want === g.img) gi.hidden = false; }; gi.onerror = () => { gi.hidden = true; }; gi.dataset.want = g.img; gi.src = g.img; // hidden until the new game's image loads (no stale picture) $('gmImg').alt = g.name; $('gmImgOpen').href = g.img;
$('gmImgCopy').onclick = async () => { try { await navigator.clipboard.writeText(g.img); status('Image URL copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const pp = $('gmPosts'); pp.innerHTML = '';
for (const p of posts) pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>', [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(p.text.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(p.text), 'WhatsApp')]));
}
const grid = $('gbGrid'); grid.innerHTML = '';
for (const [s, n] of SIZES) { const w = s.split('x')[0], h = s.split('x')[1], src = CDN + cur.slug + '/' + cur.slug + '-' + s + '.png';
const code = '<a href="' + link + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="' + cur.name + '"></a>';
const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="' + esc(cur.name) + ' ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
for (const [s, n] of SIZES) { const w = s.split('x')[0], h = s.split('x')[1], src = CDN + g.slug + '/' + g.slug + '-' + s + '.png';
const code = '<a href="' + link + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="' + g.name + '"></a>';
const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="' + esc(g.name) + ' ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(copyBtn(src, 'Copy image URL')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); grid.appendChild(d); }
};
$('gbGames').addEventListener('click', e => { const b = e.target.closest('[data-gb]'); if (!b) return; cur = GAMES.find(g => g.slug === b.dataset.gb) || cur; draw(); });
window.__gmAvail = (slug, on) => { avail[slug] = !!on; draw(); };
$('gmPick').addEventListener('click', e => { const b = e.target.closest('[data-gm]'); if (!b) return; cur = b.dataset.gm; draw(); });
draw();
}
// Spooky Doors (Halloween season, 2026-10-02): the member's game link, the share image and two short posts. Shown on the
@@ -305,9 +343,9 @@ window.IAPPromo = (function () {
if (sdp && token && sdp.dataset.filled !== token) {
sdp.dataset.filled = token;
fetch('/api/my/spookydoors/promo').then(r => r.json()).then(s => {
const pill = document.querySelector('.promo-pills [data-promo="spookydoors"]');
if (!s || !s.show) { if (pill) pill.hidden = true; sdp.hidden = true; return; }
if (pill) pill.hidden = false;
// the Games tab's picker lists Spooky Doors only while its season shows (the server decides)
if (!s || !s.show) { sdp.hidden = true; if (window.__gmAvail) window.__gmAvail('spookydoors', false); return; }
if (window.__gmAvail) window.__gmAvail('spookydoors', true);
const enc = encodeURIComponent, sl = String(s.base || 'https://spookydoors.com') + '/?ref=' + enc(token), img = s.image || 'https://spookydoors.com/og-spookydoors.jpg';
const day = (d, back) => { const t = new Date(d + 'T12:00:00Z'); if (back) t.setUTCDate(t.getUTCDate() - 1); return t.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' }); };
const ends = s.season && s.season.end ? day(s.season.end, true) : 'Oct 31';
+26 -17
View File
@@ -775,11 +775,23 @@
<button class="chip-t" data-promo="objections" type="button" role="tab">Objections</button>
<button class="chip-t" data-promo="videos" type="button" role="tab">Videos</button>
<button class="chip-t" data-promo="viral" type="button" role="tab">Viral links</button>
<button class="chip-t" data-promo="polhunter" type="button" role="tab">🎯 PolHunter</button>
<button class="chip-t" data-promo="gamebanners" type="button" role="tab">🎮 Game banners</button>
<button class="chip-t" data-promo="spookydoors" type="button" role="tab" hidden>🎃 Spooky Doors</button>
<button class="chip-t" data-promo="games" type="button" role="tab">🎮 Games</button>
</div>
<div class="card promo-sec" id="promo-spookydoors" hidden>
<div class="card promo-sec" id="promo-games" hidden>
<div class="card-head"><h3>🎮 Our games</h3><span class="sub">free to play, every link carries your username</span></div>
<p class="muted small" style="margin:0 0 10px">Every game here is free to play and brings players into InstantAdPay. Your username is built into each link, post and banner, so anyone who joins through them lands on your line. Pick a game.</p>
<div class="chips" id="gmPick" style="margin:0 0 12px"></div>
<div id="gmGeneric" hidden>
<div class="card-head"><h3 id="gmTitle"></h3><span class="sub" id="gmSub"></span></div>
<div class="promo-strip" style="padding:0 0 12px"><div><span class="eyebrow" style="margin:0 0 4px">Your link</span><div class="mono small" id="gmLink" style="overflow-wrap:anywhere">…</div></div><span><button class="btn small" id="gmLinkCopy" type="button">Copy link</button></span></div>
<div id="gmShare" class="angle-btns" style="margin:0 0 14px"></div>
<div class="promo-block"><div class="pb-head"><span class="lab">Share image</span> <span class="muted small">1200×630, for posts and link previews</span></div>
<img id="gmImg" alt="" style="max-width:100%;height:auto;border-radius:10px;display:block;margin:8px 0">
<div class="pb-actions"><a class="btn small sec" id="gmImgOpen" href="#" target="_blank" rel="noopener">Open image</a> <button class="btn small sec" id="gmImgCopy" type="button">Copy image URL</button></div></div>
<div class="card-head" style="margin-top:14px"><h3>Posts</h3><span class="sub">your link is already in them</span></div>
<div id="gmPosts"></div>
</div>
<div class="gm-kit" id="promo-spookydoors" hidden>
<div class="card-head"><h3>🎃 Spooky Doors</h3><span class="sub" id="sdpSub">our Halloween game, limited time, ends Oct 31</span></div>
<p class="muted small" style="margin:0 0 10px">Trick or treat. Players walk a spooky street, dodge black cats and bats, and knock on doors, and every door is a short visit to a member&#39;s page or ad. Your link carries your username, so anyone who joins InstantAdPay through it is tagged to you, the same as your invite link.</p>
<div class="promo-strip" style="padding:0 0 12px"><div><span class="eyebrow" style="margin:0 0 4px">Your Spooky Doors link</span><div class="mono small" id="sdpLink" style="overflow-wrap:anywhere">…</div></div><span><button class="btn small" id="sdpCopy" type="button">Copy link</button> <a class="btn small sec" href="/api/my/spookydoors">Play</a></span></div>
@@ -788,15 +800,8 @@
<div class="pb-actions"><a class="btn small sec" id="sdpImgOpen" href="#" target="_blank" rel="noopener">Open image</a> <button class="btn small sec" id="sdpImgCopy" type="button">Copy image URL</button></div></div>
<div class="card-head" style="margin-top:14px"><h3>Two short posts</h3><span class="sub">your link is already in them</span></div>
<div id="sdpPosts"></div>
</div>
<div class="card promo-sec" id="promo-gamebanners" hidden>
<div class="card-head"><h3>🎮 Game banners</h3><span class="sub">every game, 10 standard ad sizes, each linked to you</span></div>
<p class="muted small" style="margin:0 0 10px">Promote any of our games on its own: traffic exchanges, safelist mailers, ad networks, your own pages. Pick a game, then copy a size's embed code. Every banner already links to the game with your username, so players who join InstantAdPay through it land on your line.</p>
<div class="chips" id="gbGames" style="margin:0 0 10px"></div>
<div class="promo-strip" style="padding:0 0 12px"><div><span class="eyebrow" style="margin:0 0 4px">Your link for this game</span><div class="mono small" id="gbLink" style="overflow-wrap:anywhere">…</div></div><span><button class="btn small" id="gbLinkCopy" type="button">Copy link</button></span></div>
<div id="gbGrid" class="banner-grid"></div>
</div>
<div class="card promo-sec" id="promo-polhunter" hidden>
</div>
<div class="gm-kit" id="promo-polhunter" hidden>
<div class="card-head"><h3>PolHunter: your feeder program</h3><span class="sub">free to play, pays in POL, every sign-up lands on your line</span></div>
<p class="muted small" style="margin:0 0 10px">PolHunter is the easy front door. A person visits one of our sites, finds their code, taps it, and a drip of POL lands in their wallet. To play they need a free InstantAdPay account with a wallet switched on, so everyone you send in is set up and on your line before they ever see an ad package.</p>
<div class="promo-strip" style="padding:0 0 12px"><div><span class="eyebrow" style="margin:0 0 4px">Your PolHunter link</span><div class="mono small" id="phLink" style="overflow-wrap:anywhere">…</div></div><span><button class="btn small" id="phLinkCopy" type="button">Copy link</button> <a class="btn small sec" href="/api/my/polhunter">Open my board</a></span></div>
@@ -811,9 +816,13 @@
<details style="margin:0 0 16px"><summary style="cursor:pointer;font-weight:600">Where each one works best</summary><ul class="small" style="margin:8px 0 0 18px;padding:0;line-height:1.55"><li><b>TikTok:</b> the animated one first. Upload the file itself, never a link. The hook is built into the first two seconds. Paste the caption, keep three to five hashtags, and put your PolHunter link in your bio; TikTok does not make caption links clickable. Answer comments with "link in bio".</li><li><b>Instagram Reels and Stories:</b> either spot; animated tends to travel further on Reels. The link goes in your bio, or post the spot to your Story with the link sticker, which is the one place on Instagram the link is tappable.</li><li><b>YouTube Shorts:</b> the photoreal one. Title it with PolHunter, put the link in the description and pin it as the first comment.</li><li><b>Facebook feed, Reels and groups:</b> the photoreal one for an older crowd. Feed and group posts can carry the link right in the caption. Facebook keeps your name on the link when you use the share buttons here.</li><li><b>X:</b> either spot, uploaded natively, with the caption and the link in the post.</li><li><b>Telegram and WhatsApp:</b> send the video file with your link and one line under it, or use the share buttons to send the link with the caption.</li><li><b>Two rules:</b> post one spot, then the other a few days later, never both in one post. And never promise amounts; the drips are small and random, and the caption already says free to play.</li></ul></details>
<div class="card-head"><h3>Posts and a swipe</h3><span class="sub">your link is already in them</span></div>
<div id="phPosts"></div>
<div class="card-head" style="margin-top:14px"><h3>Banners</h3><span class="sub">eight sizes, each linked to you</span></div>
<div id="phBanners" class="banner-grid"></div>
<div class="card-head" style="margin-top:14px" hidden><h3>Banners</h3><span class="sub">eight sizes, each linked to you</span></div>
<div id="phBanners" class="banner-grid" hidden></div>
<p class="small" style="margin:14px 0 0"><a class="btn small sec" href="https://polhunter.com/promo" target="_blank" rel="noopener">Open the full PolHunter kit</a> <span class="muted">The leaderboard, badge cards and objection answers live there too.</span></p>
</div>
<div class="card-head" style="margin-top:16px"><h3>Banners</h3><span class="sub">10 standard ad sizes, each linked to you</span></div>
<p class="muted small" style="margin:0 0 8px">For traffic exchanges, safelist mailers and ad networks: copy the embed code, or the image URL where a network asks for one.</p>
<div id="gbGrid" class="banner-grid"></div>
</div>
<div class="card promo-sec" id="promo-viral" hidden>
<div class="card-head"><h3>Viral link builder</h3><span class="sub">any page on the site becomes your link</span></div>
@@ -1139,8 +1148,8 @@
</div>
<script src="/assets/common.js?v=20261005bc"></script><script src="/assets/welcome.js?v=20260923b"></script>
<script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20261006gb"></script>
<script src="/assets/my.js?v=20261006gb"></script>
<script src="/assets/promo.js?v=20261006gm2"></script>
<script src="/assets/my.js?v=20261006gm"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>
</html>