diff --git a/public/assets/my.js b/public/assets/my.js index ce1f701..79921d5 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -599,6 +599,7 @@ // populate the banner-size dropdown once (ids map to NAS width/height) if (r.bannerSizes && $('cSize') && !$('cSize').options.length) $('cSize').innerHTML = r.bannerSizes.map(s => '').join(''); + applyType(); // the default type is banner: show its size + image rows now that the sizes exist soloHint(); if ($('spendBanner')) { $('spendBanner').hidden = false; @@ -709,7 +710,8 @@ visits: 'A distinct member opens your site in a new tab, stays eight seconds and passes a check. Nobody counts twice.' }; const whereHint = () => { const el = $('cWhere'); if (el) el.textContent = WHERE[$('cType').value] || ''; }; whereHint(); - $('cType').addEventListener('change', () => { + // runs on every type change AND once at load, so the default type (banner) shows its size + image rows immediately + function applyType() { // hoisted: loadCampaigns may run before this line is reached whereHint(); const t = $('cType').value; $('cImageRow').hidden = t !== 'banner'; // only banners carry a creative; login frames its URL @@ -734,7 +736,8 @@ soloHint(); if (t === 'video') videoHint(); if (t === 'featured') featHint(); - }); + } + $('cType').addEventListener('change', applyType); let featStartDay = 0; // selected start-day offset (0 = today) async function featHint() { if (!lastRates || !lastRates.featuredDurations) return; diff --git a/public/my.html b/public/my.html index 40fa80e..9ea846a 100644 --- a/public/my.html +++ b/public/my.html @@ -909,7 +909,7 @@ - +