125x125 sidebar banner (sized ad serving) + shorts report link

- New 125x125 "square button" banner size; ad serve now filters by width/height,
  and the sidebar slot serves a 125x125 banner (empty until such inventory exists).
- Shorts reel gets a "report this short" link (posts to /api/report-ad).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-07 08:47:17 -05:00
parent 31a6560e9e
commit ae580b966c
14 changed files with 33 additions and 21 deletions
+3 -2
View File
@@ -111,9 +111,10 @@ window.IAP = (function () {
const rl = el.querySelector('.ad-report');
if (rl) rl.addEventListener('click', e => { e.preventDefault(); reportAd(Number(rl.dataset.cid)); });
}
async function adSlot(type, elId) {
async function adSlot(type, elId, opts) {
try {
const { ad } = await (await fetch('/api/ads/slot?type=' + type)).json();
const q = '/api/ads/slot?type=' + type + (opts && opts.width ? '&w=' + opts.width + '&h=' + opts.height : '');
const { ad } = await (await fetch(q)).json();
const el = $(elId);
if (!ad || !el) return;
if (ad.imageUrl) {