From c069ffaaf8337b3e6b2e0aade5210dedccf5bfd8 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Fri, 17 Jul 2026 07:26:21 +0000 Subject: [PATCH] ads: subtle "Advertisement" label above served units, linking to CrawlProof MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Render a small disclosure caption above each served ad unit that links back to CrawlProof — free promotion for the network, and a clearer ad disclosure for publishers. Muted grey, uppercase 9px, no underline, so it stays quiet on any host page. Skipped for the native text link, which already carries its own "Sponsored" mark. - app/ad.js/route.ts: prepend the caption before the unit iframe Co-Authored-By: Claude Opus 4.8 --- app/ad.js/route.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/ad.js/route.ts b/app/ad.js/route.ts index f6d67ec8..84829621 100644 --- a/app/ad.js/route.ts +++ b/app/ad.js/route.ts @@ -63,6 +63,19 @@ const snippet = `(function(){ iframe.style.display = 'block'; iframe.srcdoc = res.html; el.innerHTML = ''; + // A subtle disclosure label above the unit, linking back to + // CrawlProof. Skipped for the native text link, which already carries + // its own 'Sponsored' mark. Muted + no underline so it stays quiet on + // any host page. + if (format !== 'text_link') { + var cap = document.createElement('a'); + cap.href = ORIGIN + '/?utm_source=ad-label&utm_medium=ad&utm_campaign=advertisement'; + cap.target = '_blank'; + cap.rel = 'noopener sponsored'; + cap.textContent = 'Advertisement'; + cap.style.cssText = 'display:block;margin:0 0 3px;font:600 9px/1.3 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#8a94a3;text-decoration:none;opacity:.75'; + el.appendChild(cap); + } el.appendChild(iframe); }) .catch(function(){ el.removeAttribute('data-cp-filled'); });