001878bdae
- Free text ad for network members (InstantAdPay / LinkSpin sign-in or wallet, membership through the hub), one per member - Member pages viraladblitz.com/<username>: own ad + the first 5 people above in the hub line with a live ad (by place) + 2 Boosted places - Front page: amber ticker (Boosted starred), Top ads this week by verified clicks, today's numbers, ledger, contract proof - Verified visitors / views / clicks (ticket + dwell + per-visitor dedupe + per-connection cap + bot filter, owner excluded) - Boost $5 = 500 guaranteed views through VABShop: keeper-signed EIP-712 line voucher from the hub line, watcher, delivery counted per verified view with an audit row each, Network Ad Space text-ad finishing after 30 days (vabnas.js) - Trust pack: /ledger, /contract, toasts, Telegram card per Boost (once), Terms / Earnings Disclaimer / Privacy (TrustClickz), network footer from the hub with tracked links, promo kit (21 creatives) + /promote, LinkSpin zone placeholders, hub report - Old YFW links via the oldrefs map (admin load route); docstore MySQL documents + row tables - qa/smoke.mjs 162/162 (stand-in hub, chain, Telegram, NAS; Playwright desktop + phone), qa/chain.mjs 20/20 (real VABShop on anvil) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
2.9 KiB
JavaScript
27 lines
2.9 KiB
JavaScript
// A member's page (viraladblitz.com/<username>): their own ad, the ads of the first five people above them in the network sponsor
|
|
// line who have an ad here (labelled by their place in the line), Boosted places, and "join free under this member".
|
|
(async function () {
|
|
VAB.renderNav(''); VAB.renderFooter();
|
|
const $ = VAB.$, esc = VAB.esc;
|
|
const name = decodeURIComponent(location.pathname.replace(/^\/+|\/+$/g, ''));
|
|
const d = await VAB.wire('member', name).catch(() => ({}));
|
|
const pg = d.page;
|
|
if (!pg) { $('own').innerHTML = '<div class="card"><h2>No member by that name</h2><p>Check the link, or <a href="/">see the front page</a>.</p></div>'; $('levels').innerHTML = ''; return; }
|
|
document.title = '@' + pg.username + ' recommends | ViralAdBlitz';
|
|
$('who').textContent = '@' + pg.username.toUpperCase() + ' RECOMMENDS';
|
|
$('teamHead').textContent = 'Also recommended by @' + pg.username + '\'s team';
|
|
if (pg.ad) {
|
|
const a = pg.ad;
|
|
$('own').innerHTML = '<article class="paper big">' + (a.boosted ? '<span class="tag">★ BOOSTED</span>' : '') + '<h1>' + esc(a.headline) + '</h1><p>' + esc(a.line1) + (a.line2 ? ' ' + esc(a.line2) : '') + '</p>'
|
|
+ '<div class="row" style="margin-top:4px"><a class="btn-green" data-go="' + a.id + '" data-p="own" target="_blank" rel="noopener sponsored" href="' + VAB.goHref(a.id, 'own') + '">Take a look</a><span class="host mono small" style="color:var(--paper-sub)">' + esc(a.host) + ' · this member\'s own ad</span></div></article>';
|
|
} else $('own').innerHTML = '<div class="card"><h2>@' + esc(pg.username) + ' has not posted an ad yet</h2><p>Their team\'s ads are below.</p></div>';
|
|
const rows = (pg.line || []).map(x => '<div class="lvl' + (x.boosted ? ' star' : '') + '"><span class="no">LEVEL ' + x.level + '</span><div class="txt"><b>' + esc(x.headline) + '</b><div>' + esc(x.line1) + (x.line2 ? ' ' + esc(x.line2) : '') + ' ' + esc(x.owner) + (x.boosted ? ' · ★ Boosted' : '') + '</div></div>'
|
|
+ '<a class="btn-line" data-go="' + x.id + '" data-p="level' + x.level + '" target="_blank" rel="noopener sponsored" href="' + VAB.goHref(x.id, 'level' + x.level) + '">Visit</a></div>');
|
|
for (let i = rows.length; i < 5; i++) rows.push('<div class="lvl open"><span class="no">OPEN</span><div class="txt"><b>An open place</b><div>' + (pg.hubOk === false && !i ? 'The network line is loading slowly. Try again in a minute.' : 'When more of this member\'s line posts an ad, it shows here.') + '</div></div></div>');
|
|
$('levels').innerHTML = rows.join('');
|
|
if ((pg.boosted || []).length) { $('boostedSec').hidden = false; $('boosted').innerHTML = pg.boosted.map(x => VAB.paper(x, '', 'boosted')).join(''); }
|
|
$('joinHead').textContent = 'Want your ad on pages like this one?';
|
|
$('joinText').textContent = 'Join free under @' + pg.username + '. Your ad goes on your own page and on every page you bring in, five levels down.';
|
|
$('joinBtn').href = pg.joinUrl; $('joinBtn').target = '_blank'; $('joinBtn').rel = 'noopener';
|
|
})();
|