diff --git a/ads.js b/ads.js index 15a656b..27ecd18 100644 Binary files a/ads.js and b/ads.js differ diff --git a/public/assets/my.js b/public/assets/my.js index 43650d8..9001e0a 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -819,7 +819,7 @@ + '' + (['banner', 'text'].includes(c.type) ? (c.impsNas || 0).toLocaleString() : 'n/a') + '' + '' + c.clicks + (r.clickSources && r.clickSources[c.id] ? '
' + Object.entries(r.clickSources[c.id]).sort((a, b) => b[1] - a[1]).map(([k, v]) => '' + esc(k) + ' ' + v + '').join('') + (c.impsNas ? ' ยท network: see Network views' : '') + '
' : '') + '' + (c.type === 'visits' ? 'paid up front' + c.imps.toLocaleString() + ' of ' + Number(c.body || 0).toLocaleString() + ' visits' - : c.type === 'featured' ? 'paid up front' + Number(c.body || 0) + ' day' + (Number(c.body || 0) === 1 ? '' : 's') + '' + : c.type === 'featured' ? 'paid up front' + featRun(c) + '' : '' + c.spent + '' + c.budget + '') + '' + (c.status === 'out' ? (c.type === 'visits' ? 'pack delivered' : 'budget spent') : c.status === 'done' ? '' + (c.type === 'featured' ? 'run ended' : 'ended') + '' : c.scheduled ? 'scheduled' : c.status) + '' + '' + (c.status === 'active' ? '' @@ -1328,6 +1328,13 @@ } // schedule chips on the campaign table (local time) + by-hour view bars const fmtWhen = ms => new Date(ms).toLocaleString([], { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' }); + // featured run column: days left of the booked total (Hugh, 2026-09-16: "says 14 but it's actually 7") + function featRun(c) { + const total = Number(c.body || 0), now = Date.now(); + if (c.status === 'done' || !c.expires || c.expires <= now) return '' + total + ' day' + (total === 1 ? '' : 's') + ' done'; + const left = Math.max(1, Math.ceil((c.expires - now) / 86400000)); + return '' + left + ' of ' + total + ' day' + (total === 1 ? '' : 's') + ' left'; + } function schedChips(c) { const now = Date.now(); let s = ''; if (c.starts && c.starts > now) s += ' starts ' + fmtWhen(c.starts) + ''; diff --git a/public/my.html b/public/my.html index 660f14d..e953efe 100644 --- a/public/my.html +++ b/public/my.html @@ -1021,7 +1021,7 @@ - +