// Weekly leaderboards: top 10 by verified visitors sent, top 10 by distinct traffic sources (Central time week). (async function () { VBB.renderNav('/leaders'); VBB.renderFooter(); const $ = VBB.$, esc = VBB.esc; const d = await VBB.getJSON('/api/leaders'); if (d.error) return VBB.status(d.error, 'err'); const wk = new Date(d.week + 'T12:00:00Z').toLocaleDateString('en-US', { month: 'long', day: 'numeric', timeZone: 'UTC' }); $('weekLbl').textContent = 'Week of Monday ' + wk + ', Central time. Resets every Monday at 12:00 AM. Only verified visitors count: a real browser, on the page a few seconds, once a day per visitor.'; const table = (rows, main) => rows.length ? '
| # | Member | ' + (main === 'visitors' ? 'Visitors' : 'Sources') + ' | ' + (main === 'visitors' ? 'Sources' : 'Visitors') + ' |
|---|---|---|---|
| ' + (i + 1) + ' | ' + esc(r.name) + ' | ' + VBB.n(r[main]) + ' | ' + VBB.n(main === 'visitors' ? r.sources : r.visitors) + ' |
Nobody yet this week. Share your link from My Banners and take the top spot.
'; $('lbVisitors').innerHTML = table(d.visitors, 'visitors'); $('lbSources').innerHTML = table(d.sources, 'sources'); })();