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:
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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();
|
||||
})();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<meta name="twitter:image" content="https://instantadpay.com/banners/iap-hero-1200x630.png">
|
||||
<meta name="theme-color" content="#043b2f">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
@@ -140,7 +140,7 @@
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260907s"></script>
|
||||
<script src="/assets/common.js?v=20260907v"></script>
|
||||
<script src="/assets/contract.js?v=20260906m"></script>
|
||||
<script src="/assets/chat.js?v=20260906m"></script>
|
||||
</body>
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
<meta name="twitter:image" content="https://instantadpay.com/banners/iap-hero-1200x630.png">
|
||||
<meta name="theme-color" content="#043b2f">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="/assets/common.js?v=20260907s"></script>
|
||||
<script src="/assets/common.js?v=20260907v"></script>
|
||||
<script src="/assets/wallet.js?v=20260907q"></script>
|
||||
<script src="/assets/home.js?v=20260906m"></script>
|
||||
<script src="/assets/chat.js?v=20260906m"></script>
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
<meta name="twitter:image" content="https://instantadpay.com/banners/iap-hero-1200x630.png">
|
||||
<meta name="theme-color" content="#043b2f">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
@@ -36,7 +36,7 @@
|
||||
<div>InstantAdPay · <a href="/">how it works</a> · <a id="contractLink" href="#" target="_blank" rel="noopener">contract source ↗</a></div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260907s"></script>
|
||||
<script src="/assets/common.js?v=20260907v"></script>
|
||||
<script src="/assets/ledger.js?v=20260906m"></script>
|
||||
<script src="/assets/chat.js?v=20260906m"></script>
|
||||
</body>
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Member area | InstantAdPay</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907t">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
</head>
|
||||
<body class="bo-body">
|
||||
|
||||
@@ -678,9 +678,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260907s"></script>
|
||||
<script src="/assets/common.js?v=20260907v"></script>
|
||||
<script src="/assets/wallet.js?v=20260907q"></script>
|
||||
<script src="/assets/my.js?v=20260907u"></script>
|
||||
<script src="/assets/my.js?v=20260907v"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Shorts | InstantAdPay</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
<style>
|
||||
html,body{height:100%;margin:0;overflow:hidden;background:#000}
|
||||
.sh{position:fixed;inset:0;display:flex;flex-direction:column;background:#000;color:var(--ink,#e8fff7)}
|
||||
@@ -40,9 +40,10 @@
|
||||
<a class="btn small" id="shCta" target="_blank" rel="noopener nofollow" hidden>Learn more</a>
|
||||
<button class="btn small sec" id="shNext" type="button" hidden>Next short →</button>
|
||||
</div>
|
||||
<a href="#" id="shReport" class="sh-report">⚠ report this short</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/shorts.js?v=20260907e"></script>
|
||||
<script src="/assets/shorts.js?v=20260907v"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Transaction | InstantAdPay</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
</head>
|
||||
<body>
|
||||
<div id="nav"></div>
|
||||
@@ -33,7 +33,7 @@
|
||||
<p><a href="/ledger">← Back to the live ledger</a> · <a href="/contract">Read the contract review</a></p>
|
||||
</div>
|
||||
</section>
|
||||
<script src="/assets/common.js?v=20260907s"></script>
|
||||
<script src="/assets/common.js?v=20260907v"></script>
|
||||
<script src="/assets/tx.js?v=20260906m"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Viewing ad — InstantAdPay</title>
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
<style>
|
||||
html,body{height:100%;margin:0;overflow:hidden}
|
||||
.vw{display:flex;flex-direction:column;height:100vh;height:100dvh;background:var(--bg,#04110c);color:var(--ink,#e8fff7)}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
<title>Banner wall | InstantAdPay</title>
|
||||
<!--OG-->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907s">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260907v">
|
||||
</head>
|
||||
<body>
|
||||
<div id="nav"></div>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="/assets/common.js?v=20260907s"></script>
|
||||
<script src="/assets/common.js?v=20260907v"></script>
|
||||
<script src="/assets/wall.js?v=20260907s"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user