// A member's page (viraladblitz.com/): 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 = '

No member by that name

Check the link, or see the front page.

'; $('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 = '
' + (a.boosted ? '★ BOOSTED' : '') + '

' + esc(a.headline) + '

' + esc(a.line1) + (a.line2 ? ' ' + esc(a.line2) : '') + '

' + '
Take a look' + esc(a.host) + ' · this member\'s own ad
'; } else $('own').innerHTML = '

@' + esc(pg.username) + ' has not posted an ad yet

Their team\'s ads are below.

'; const rows = (pg.line || []).map(x => '
LEVEL ' + x.level + '
' + esc(x.headline) + '
' + esc(x.line1) + (x.line2 ? ' ' + esc(x.line2) : '') + ' ' + esc(x.owner) + (x.boosted ? ' · ★ Boosted' : '') + '
' + 'Visit
'); for (let i = rows.length; i < 5; i++) rows.push('
OPEN
An open place
' + (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.') + '
'); $('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'; })();