Promo tools: Game banners section (7 games x 10 standard sizes on banners.adrotate.xyz, embed code linked to the member)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-06 07:52:17 -05:00
parent 9142efef01
commit 5a39b2599f
3 changed files with 37 additions and 3 deletions
+1 -1
View File
@@ -2189,7 +2189,7 @@
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', 'spookydoors'];
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'polhunter', 'gamebanners', 'spookydoors'];
if (name === 'toolkit') loadToolkit();
const pill = document.querySelector('.promo-pills [data-promo="' + name + '"]');
if (!ids.includes(name) || !pill || pill.hidden) name = 'posts';
+26
View File
@@ -273,6 +273,32 @@ 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;
const enc = encodeURIComponent, CDN = 'https://banners.adrotate.xyz/game-banners/';
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=' }];
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 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 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>';
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(); });
draw();
}
// Spooky Doors (Halloween season, 2026-10-02): the member's game link, the share image and two short posts. Shown on the
// season window the Games card uses (the server decides; the admin gets a preview before the start), hidden after it.
const sdp = $('promo-spookydoors');
+10 -2
View File
@@ -776,6 +776,7 @@
<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>
</div>
<div class="card promo-sec" id="promo-spookydoors" hidden>
@@ -788,6 +789,13 @@
<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 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>
@@ -1131,8 +1139,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=20261002ref"></script>
<script src="/assets/my.js?v=20261005bc"></script>
<script src="/assets/promo.js?v=20261006gb"></script>
<script src="/assets/my.js?v=20261006gb"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>
</html>