Promo kit (Marty 2026-11-14: "get all the creatives built for downline banners and VBB, and put them in all the places they need to go"): promokit.js is the one source for the Downline Banners kit, published as GET /api/promo-kit?u=<network username or wallet> (public, CORS open, read by /promote and by InstantAdPay's Promo tools > Network sites): personal links (?ref=), 21 creatives (3 angles: $5 spot + 300 guaranteed views / 10 levels pay as spots sell after yours / no withdrawals, paid in the same transaction; each in 125x125, 468x60, 728x90, 300x250, 160x600, 1200x630, 1080x1080) at /art/kit/dlb-<angle>-<shape>.png (ad-blocker-neutral names, rendered crisp from HTML by tools/kit-art.mjs with Playwright), 5 lines, 3 headlines, 1 email, 2 posts (facts per SPEC.md + contract: sponsor 30%, 10 levels x 5.5%, splits fixed; nothing promised). /promote page (kitpage.js + promote.js + kit.css): username from sign-in, ?u= or typed; nav + footer link Promote; sitemap. server.js: one require + one hook line. common.js?v=20261114p. Smoke 106/106 (promo kit feed, every PNG at its exact size, Promote page signed in, desktop + phone screenshots; gate step now screenshots itself if it ever stalls).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// Promote page (2026-11-14): the promo kit from /api/promo-kit with the member's network username in every link.
|
||||
// Username: ?u= first, then the signed-in member's (My Spots), then the last one typed here (this browser only).
|
||||
(async function () {
|
||||
await BL.renderNav('/promote'); BL.renderFooter();
|
||||
const $ = BL.$; const RE = /^(?:[A-Za-z0-9_.-]{2,40}|0x[0-9a-fA-F]{40})$/;
|
||||
let u = new URLSearchParams(location.search).get('u') || '';
|
||||
let signed = false;
|
||||
if (!RE.test(u)) {
|
||||
u = '';
|
||||
try { const me = await BL.getJSON('/api/me'); if (me.signedIn) { const d = await BL.getJSON('/api/my'); if (d && !d.error) { u = d.username || d.address || ''; signed = true; } } } catch (e) {}
|
||||
}
|
||||
if (!u) { try { u = localStorage.getItem('kit.u') || ''; } catch (e) {} if (!RE.test(u)) u = ''; }
|
||||
$('whoIn').value = u;
|
||||
if (signed) $('whoNote').textContent = 'Signed in: your links below use ' + (u.startsWith('0x') ? 'your wallet (no network username found yet)' : '@' + u) + '.';
|
||||
async function show(name) {
|
||||
try { await KitPage.load($('kit'), name); BL.status(''); } catch (e) { BL.status('Could not load the kit. Try again in a moment.', 'err'); }
|
||||
}
|
||||
$('whoForm').addEventListener('submit', e => {
|
||||
e.preventDefault(); const v = $('whoIn').value.trim().replace(/^@/, '');
|
||||
if (v && !RE.test(v)) return BL.status('That does not look like a username: letters, numbers, dot, dash or underscore.', 'err');
|
||||
try { localStorage.setItem('kit.u', v); } catch (e2) {}
|
||||
show(v);
|
||||
});
|
||||
show(u);
|
||||
})();
|
||||
Reference in New Issue
Block a user