// How it works + Packages: nav, footer, and the live config numbers. (async function () { const page = location.pathname.replace(/\/$/, '') || '/'; VBB.renderNav(page); VBB.renderFooter(); const c = await VBB.getConfig().catch(() => ({})); const set = (k, v) => document.querySelectorAll('[data-k=' + k + ']').forEach(el => { el.textContent = v; }); if (c.perShift) set('perShift', c.perShift); if (c.viewsPerCycle != null) set('views', VBB.n(c.viewsPerCycle)); if (c.visitSeconds) set('secs', c.visitSeconds); // package prices from config (the Packages page has its own script, packages.js, with the Buy buttons) const money = v => '$' + (Number.isInteger(v) ? v : Number(v).toFixed(2)); const pp = document.getElementById('pkPacks'); if (pp && c.packs && c.packs.length) pp.innerHTML = c.packs.map(p => '