From ae580b966cd9d821f7a220b0150c23538c301b63 Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 7 Sep 2026 08:47:17 -0500 Subject: [PATCH] 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 --- ads.js | Bin 62758 -> 63158 bytes public/assets/common.js | 5 +++-- public/assets/my.js | 2 +- public/assets/shorts.js | 9 ++++++++- public/assets/site.css | 3 +++ public/contract.html | 4 ++-- public/index.html | 4 ++-- public/ledger.html | 4 ++-- public/my.html | 6 +++--- public/shorts.html | 5 +++-- public/tx.html | 4 ++-- public/view.html | 2 +- public/wall.html | 4 ++-- server.js | 2 +- 14 files changed, 33 insertions(+), 21 deletions(-) diff --git a/ads.js b/ads.js index f5522512a9cd7658b402e7fcecd02fafab3dd0b0..0d14ba5fe97cea8e0e505ac75383549797d0968f 100644 GIT binary patch delta 456 zcmZ4Xih0{x<_(&B&N^HQ3e^gkDOL*VhDN3pK&-B#P;R9FWaublKqaJTs*vLlbBg z4*87K%=C;B&B^o3N}Pah0Rf;18j9r#H8lzvP?M6O#wgg@+A5SIS&^&<)en}*(A+F& zzFn}MLbq6h-I1K1S6re{Tm^J@xq`idx`Lyhivrj;w)S8)#AaK2bp>G1s3U38Q7A|( zO3W>W>WnU_EJ)Q+NUZ<{EHE5mfy&`RvDT9>?6jHu(?efdT|paUn>NrU{~#CFAO)vL gg&?4v8k!0|p1z(T3WmU#ffzhlewV`LT+f}W0W@-o;{X5v delta 58 zcmV-A0LA~d?E|Lj1F$I$vu_T8D3d!kXtU-wwh@!9Mlq9vN-vWs-WLrqCoCXaba`-P QEFfigldiiVv;9iBtH>J|X8-^I diff --git a/public/assets/common.js b/public/assets/common.js index 2348d5d..42cd5ee 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -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) { diff --git a/public/assets/my.js b/public/assets/my.js index 29a911f..4d61a5f 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -1714,7 +1714,7 @@ // banner + text placements inside the back office (they ARE the audience) IAP.adSlot('banner', 'adSlotLogin'); IAP.adSlot('banner', 'adSlotOverview'); - IAP.adSlot('text', 'adSlotSide'); + IAP.adSlot('banner', 'adSlotSide', { width: 125, height: 125 }); // square button ad in the sidebar render(); })(); diff --git a/public/assets/shorts.js b/public/assets/shorts.js index 4f5b4c8..5c085ac 100644 --- a/public/assets/shorts.js +++ b/public/assets/shorts.js @@ -21,7 +21,7 @@ $('shMsg').textContent = r.status.left <= 0 ? 'That\'s today\'s shorts. Come back tomorrow.' : 'No shorts in rotation right now. Check back soon.'; return; } - st.token = r.token; st.secs = r.ad.watchSecs; + st.token = r.token; st.secs = r.ad.watchSecs; st.adId = r.ad.id; const v = $('shVideo'); $('shMsg').hidden = true; v.hidden = false; v.src = r.ad.videoUrl; v.currentTime = 0; @@ -53,6 +53,13 @@ $('shNext').hidden = false; } $('shNext').addEventListener('click', load); + $('shReport').addEventListener('click', e => { + e.preventDefault(); if (!st.adId) return; + const reason = (prompt('Report this short: broken, inappropriate, spam, scam, or other', 'inappropriate') || '').trim().toLowerCase(); + if (!reason) return; + fetch('/api/report-ad', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ campaignId: st.adId, reason }) }) + .then(() => { $('shReport').textContent = '✓ reported — thanks'; }).catch(() => {}); + }); // presence enforcement: pause when the tab/window loses focus, resume on return document.addEventListener('visibilitychange', () => { const v = $('shVideo'); if (!v || !v.src) return; diff --git a/public/assets/site.css b/public/assets/site.css index d12d343..c96e249 100644 --- a/public/assets/site.css +++ b/public/assets/site.css @@ -574,3 +574,6 @@ img{max-width:100%} .lt-node.deep{color:var(--muted)} .lt-node.qualified{border-color:#ffb238;color:#ffd15c;box-shadow:0 0 0 1px rgba(255,177,56,.35)} .lt-node.open{border-style:dashed;color:var(--muted);background:transparent} + +.sh-report{display:block;text-align:center;margin-top:10px;color:rgba(255,255,255,.45);font-size:12px} +.sh-report:hover{color:rgba(255,255,255,.8)} diff --git a/public/contract.html b/public/contract.html index 62fb2ec..ec6f406 100644 --- a/public/contract.html +++ b/public/contract.html @@ -16,7 +16,7 @@ - +
@@ -140,7 +140,7 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.
- + diff --git a/public/index.html b/public/index.html index 43d8754..d1164d9 100644 --- a/public/index.html +++ b/public/index.html @@ -19,7 +19,7 @@ - + @@ -437,7 +437,7 @@ - + diff --git a/public/ledger.html b/public/ledger.html index 4f698e6..460ff91 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -16,7 +16,7 @@ - +
@@ -36,7 +36,7 @@
InstantAdPay · how it works · contract source ↗
- + diff --git a/public/my.html b/public/my.html index de25a84..c9c320a 100644 --- a/public/my.html +++ b/public/my.html @@ -4,7 +4,7 @@ Member area | InstantAdPay - + @@ -678,9 +678,9 @@ - + - + diff --git a/public/shorts.html b/public/shorts.html index 63afcfd..f7306d0 100644 --- a/public/shorts.html +++ b/public/shorts.html @@ -4,7 +4,7 @@ Shorts | InstantAdPay - +