// Promo tools > Network sites (Marty 2026-11-14): the promo kits of the other network sites, read live from each site's own public // feed (GET /api/promo-kit?u=), so a creative or line changed on Downline Banners or Viral Banner Blitz shows here // at once. Usernames are network-wide: the member's InstantAdPay username is their sponsor link on those sites even if they never // visited them. Nothing is stored here. window.IAPNetKits = (function () { const SITES = [ { key: 'dlb', name: 'Downline Banners', feed: 'https://downlinebanners.com/api/promo-kit', blurb: 'One global line of $5 banner spots on Polygon. A spot buys 300 guaranteed views on the board and a place in the line; every sale is split on-chain in the same transaction. Nothing is promised: a spot is paid only when spots sell after it.' }, { key: 'vbb', name: 'Viral Banner Blitz', feed: 'https://viralbannerblitz.com/api/promo-kit', blurb: 'One shared loop of 125x125 banners. Network members post free once a day, real visitors push the loop, and a banner that rides out earns network ad views. Weekly leaderboards for visitors sent. Advertising, not income.' } ]; const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c])); const $ = id => document.getElementById(id); let user = '', cur = '', cache = {}, txt = []; try { cur = localStorage.getItem('iap.netkit') || ''; } catch (e) {} if (!SITES.some(s => s.key === cur)) cur = SITES[0].key; function setUser(u) { if (u && u !== user) { user = u; cache = {}; } } async function copy(t, btn) { try { await navigator.clipboard.writeText(t); } catch (e) { const a = document.createElement('textarea'); a.value = t; document.body.appendChild(a); a.select(); try { document.execCommand('copy'); } catch (e2) {} a.remove(); } if (window.IAP && IAP.status) IAP.status('Copied.', 'ok'); if (btn) { const o = btn.textContent; btn.textContent = 'Copied'; setTimeout(() => { btn.textContent = o; }, 1300); } } const cb = (t, label, cls) => { txt.push(t); return ''; }; function pick() { const p = $('nkPick'); if (!p) return; p.innerHTML = SITES.map(s => '').join(''); p.querySelectorAll('[data-nk]').forEach(b => b.addEventListener('click', () => { cur = b.dataset.nk; try { localStorage.setItem('iap.netkit', cur); } catch (e) {} pick(); show(); })); } function render(site, k) { txt = []; const by = {}; const angles = []; (k.creatives || []).forEach(c => { if (!by[c.angle]) { by[c.angle] = []; angles.push(c); } by[c.angle].push(c); }); let h = '

' + esc(site.blurb) + '

'; // tracked links (2026-11-14): the site's LinkSpin network link, credited here to InstantAdPay as the site that sent the visit const strip = (label, url, cls) => '
' + esc(label) + '
' + esc(url) + '
' + cb(url, 'Copy link', cls) + '
'; const fromHere = u => String(u).replace(/([?&]src=)[a-z0-9]+/i, '$1iap'); h += k.links.map(l => strip(l.label, l.url, '') + (l.tracked ? strip(l.label + ', tracked', fromHere(l.tracked), 'sec') : '')).join(''); if (k.links.some(l => l.tracked)) h += '

A tracked link goes through LinkSpin first, so the network can see the visit came from InstantAdPay, then opens the same page with your username. Use either one.

'; h += '

Creatives

every HTML snippet already links to you
'; angles.forEach(a => { h += '
' + esc(a.angleLabel) + ' ' + by[a.angle].length + ' sizes
' + by[a.angle].map(c => '
' + esc(k.name + ', ' + c.label) + '' + '
' + esc(c.label) + ' ' + c.w + '×' + c.h + '
Download ' + cb(c.url, 'Copy URL') + ' ' + cb(c.html, 'Copy HTML') + '
').join('') + '
'; }); h += '

Short lines

chats, comments, text ads, signatures
' + k.lines.map(t => '
' + esc(t) + '
' + cb(t) + '
').join(''); h += '

Headlines

' + k.headlines.map(t => '
' + esc(t) + '
' + cb(t) + '
').join(''); h += '

Email

plain text, paste it into any mailer
Subject: ' + esc(k.email.subject) + '
' + esc(k.email.body) + '
' + cb(k.email.subject, 'Copy subject') + ' ' + cb(k.email.body, 'Copy email', '') + '
'; h += '

Social posts

' + k.posts.map(t => '
' + esc(t) + '
' + cb(t, 'Copy post') + '
').join(''); if (k.note) h += '

' + esc(k.note) + '

'; if (k.promotePage) h += '

The same kit is on ' + esc(k.name) + ' › Promote.

'; return h; } async function show() { const box = $('nkBody'); if (!box) return; const site = SITES.find(s => s.key === cur); if (!user) { box.innerHTML = '

Pick a username first: it becomes your link on every network site.

'; return; } box.innerHTML = '

Loading the ' + esc(site.name) + ' kit...

'; try { if (!cache[cur]) { const r = await fetch(site.feed + '?u=' + encodeURIComponent(user), { cache: 'no-store' }); if (!r.ok) throw new Error('HTTP ' + r.status); cache[cur] = await r.json(); } if (cur !== site.key) return; box.innerHTML = render(site, cache[cur]); box.querySelectorAll('[data-nkc]').forEach(b => b.addEventListener('click', () => copy(txt[Number(b.dataset.nkc)], b))); } catch (e) { box.innerHTML = '

Could not load the ' + esc(site.name) + ' kit right now. Try again in a minute.

'; } } function load(u) { if (u) setUser(u); pick(); show(); } return { load, setUser, SITES }; })();