From 4ac95bd0c0349475ced914d98af6ee6babf96015 Mon Sep 17 00:00:00 2001 From: martbost Date: Thu, 8 Oct 2026 15:00:50 -0500 Subject: [PATCH] Zones: ad-blocker proofing. House creatives served as /art/house-.svg (EasyList blocks any URL with an IAB size token like -728x90.), zone owners told not to wrap the tag in ad-named elements Co-Authored-By: Claude Fable 5.1 --- public/art/house-bar.svg | 1 + public/art/house-box.svg | 1 + public/art/house-column.svg | 1 + public/art/house-leader.svg | 1 + public/art/house-panel.svg | 1 + public/art/house-square.svg | 1 + public/art/house-strip.svg | 1 + public/art/house-tile.svg | 1 + public/art/house-tower.svg | 1 + public/assets/zones-screen.js | 2 +- public/zones.html | 2 +- server.js | 2 +- zones.js | 4 +++- 13 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 public/art/house-bar.svg create mode 100644 public/art/house-box.svg create mode 100644 public/art/house-column.svg create mode 100644 public/art/house-leader.svg create mode 100644 public/art/house-panel.svg create mode 100644 public/art/house-square.svg create mode 100644 public/art/house-strip.svg create mode 100644 public/art/house-tile.svg create mode 100644 public/art/house-tower.svg diff --git a/public/art/house-bar.svg b/public/art/house-bar.svg new file mode 100644 index 0000000..89dc49f --- /dev/null +++ b/public/art/house-bar.svg @@ -0,0 +1 @@ +LinkSpinGet your link \ No newline at end of file diff --git a/public/art/house-box.svg b/public/art/house-box.svg new file mode 100644 index 0000000..2f2b44d --- /dev/null +++ b/public/art/house-box.svg @@ -0,0 +1 @@ +LinkSpinOne link. Every page you promote, in turn.Weights, hours, health checks, real numbers.Get your link \ No newline at end of file diff --git a/public/art/house-column.svg b/public/art/house-column.svg new file mode 100644 index 0000000..b991e7e --- /dev/null +++ b/public/art/house-column.svg @@ -0,0 +1 @@ +LinkSpinOne link.Every pageyou promote,in turn.Bots filteredon the server.Click idspass through.Your ownshort domain.Start free \ No newline at end of file diff --git a/public/art/house-leader.svg b/public/art/house-leader.svg new file mode 100644 index 0000000..52c5bae --- /dev/null +++ b/public/art/house-leader.svg @@ -0,0 +1 @@ +LinkSpinOne link. Every page you promote, in turn.Get your link \ No newline at end of file diff --git a/public/art/house-panel.svg b/public/art/house-panel.svg new file mode 100644 index 0000000..91eb0fa --- /dev/null +++ b/public/art/house-panel.svg @@ -0,0 +1 @@ +LinkSpinOne link. Every page you promote, in turn.Weights, hours, health checks, real numbers.Start free \ No newline at end of file diff --git a/public/art/house-square.svg b/public/art/house-square.svg new file mode 100644 index 0000000..7e88ba6 --- /dev/null +++ b/public/art/house-square.svg @@ -0,0 +1 @@ +LinkSpinOne link. Every pageyou promote, in turn.Bots filtered. Real numbers.Start free \ No newline at end of file diff --git a/public/art/house-strip.svg b/public/art/house-strip.svg new file mode 100644 index 0000000..38e9652 --- /dev/null +++ b/public/art/house-strip.svg @@ -0,0 +1 @@ +LinkSpinOne link. Every page you promote, in turn.Get your link \ No newline at end of file diff --git a/public/art/house-tile.svg b/public/art/house-tile.svg new file mode 100644 index 0000000..ac4732d --- /dev/null +++ b/public/art/house-tile.svg @@ -0,0 +1 @@ +LinkSpinOne link,every page.Start free \ No newline at end of file diff --git a/public/art/house-tower.svg b/public/art/house-tower.svg new file mode 100644 index 0000000..de74203 --- /dev/null +++ b/public/art/house-tower.svg @@ -0,0 +1 @@ +LinkSpinOne link.Every pageyou promote.Get your link \ No newline at end of file diff --git a/public/assets/zones-screen.js b/public/assets/zones-screen.js index c8f7250..3049003 100644 --- a/public/assets/zones-screen.js +++ b/public/assets/zones-screen.js @@ -21,7 +21,7 @@ $('rows').querySelectorAll('[data-del]').forEach(b => b.addEventListener('click', async () => { if (!await dialog({ title: 'Remove this zone?', text: 'The tag on your site stops showing ads. Credits already earned stay.', ok: 'Remove', danger: true })) return; try { await api('/api/my/zones/' + b.dataset.del, { remove: true }); SEL = null; $('tagPanel').hidden = true; load(); } catch (e) { toast(e.message, true); } })); if (SEL && Z.find(z => z.id === SEL)) showTag(SEL); } - function showTag(id) { const z = Z.find(x => x.id === id); if (!z) return; SEL = id; $('tagPanel').hidden = false; $('tagTitle').textContent = 'Embed tag · ' + z.name; $('tagCode').textContent = tag(z); $('tagNote').textContent = 'Paste it where the banner should appear (' + z.size + '). It sizes itself and never loads more than one ad.'; $('tagCopy').onclick = () => CR.copy(tag(z)); $('tagCheck').onclick = async () => { await load(); const zz = Z.find(x => x.id === id); toast(zz && zz.lastSeen && Date.now() - zz.lastSeen < 3600e3 ? 'Live: last view ' + ago(zz.lastSeen) : 'No view in the last hour. Is the tag on a page people open?', !(zz && zz.lastSeen && Date.now() - zz.lastSeen < 3600e3)); }; } + function showTag(id) { const z = Z.find(x => x.id === id); if (!z) return; SEL = id; $('tagPanel').hidden = false; $('tagTitle').textContent = 'Embed tag · ' + z.name; $('tagCode').textContent = tag(z); $('tagNote').textContent = 'Paste it where the banner should appear (' + z.size + '). It sizes itself and never loads more than one ad. Tip: do not wrap it in an element whose class or id contains "ad", "banner" or "sponsor" (ad blockers hide those), and if you test with an ad blocker on, pause it for your own site first.'; $('tagCopy').onclick = () => CR.copy(tag(z)); $('tagCheck').onclick = async () => { await load(); const zz = Z.find(x => x.id === id); toast(zz && zz.lastSeen && Date.now() - zz.lastSeen < 3600e3 ? 'Live: last view ' + ago(zz.lastSeen) : 'No view in the last hour. Is the tag on a page people open?', !(zz && zz.lastSeen && Date.now() - zz.lastSeen < 3600e3)); }; } $('newBtn').addEventListener('click', async () => { const v = await dialog({ title: 'Add a zone', text: 'One zone per spot on a page. Paid ads only serve on the site you name here; anywhere else the tag shows the house banner.', fields: [{ k: 'name', label: 'Name', placeholder: 'My blog · sidebar', max: 60 }, { k: 'site', label: 'Site it lives on (required)', placeholder: 'myblog.com', max: 80 }, { k: 'size', label: 'Size: ' + (SIZES.join(', ') || '728x90, 468x60, 300x250, 160x600, 320x50'), value: '728x90', mono: true }], ok: 'Create' }); if (!v) return; try { const r = await api('/api/my/zones', v); SEL = r.zone.id; toast('Zone created. Copy the tag.'); load(); } catch (e) { toast(e.message, true); } diff --git a/public/zones.html b/public/zones.html index 726c542..c0c0373 100644 --- a/public/zones.html +++ b/public/zones.html @@ -31,6 +31,6 @@ - + diff --git a/server.js b/server.js index 85cd1a4..8938241 100644 --- a/server.js +++ b/server.js @@ -888,7 +888,7 @@ const server = http.createServer(async (req, res) => { const u = new URL(req.url, 'http://x'); const p = u.pathname; // zone endpoints run on other people's sites and show only ad creatives, so they pass the curtain - const zonePath = p === '/z.js' || p === '/z/nas' || p.startsWith('/api/zone/') || p.startsWith('/banners/linkspin-'); + const zonePath = p === '/z.js' || p === '/z/nas' || p.startsWith('/api/zone/') || p.startsWith('/banners/linkspin-') || p.startsWith('/art/house-'); if (!zonePath && curtained(req, res, u)) return; // nothing below this line runs for an uninvited visitor // -- the rotator redirect: one hop, recorded, on any host (LinkSpin) diff --git a/zones.js b/zones.js index d7c044a..3d4b992 100644 --- a/zones.js +++ b/zones.js @@ -9,7 +9,9 @@ const path = require('path'); const crypto = require('crypto'); let DATA_DIR = null, ads = null, siteHost = 'linkspin.app'; const SIZES = { '728x90': [728, 90], '468x60': [468, 60], '300x250': [300, 250], '336x280': [336, 280], '250x250': [250, 250], '125x125': [125, 125], '160x600': [160, 600], '120x600': [120, 600], '320x50': [320, 50] }; // + 336x280 / 250x250 / 125x125 / 120x600 (Marty 2026-10-07) -const HOUSE = { '728x90': '/banners/linkspin-728x90.svg', '468x60': '/banners/linkspin-468x60.svg', '300x250': '/banners/linkspin-300x250.svg', '336x280': '/banners/linkspin-336x280.svg', '250x250': '/banners/linkspin-250x250.svg', '125x125': '/banners/linkspin-125x125.svg', '160x600': '/banners/linkspin-160x600.svg', '120x600': '/banners/linkspin-120x600.svg', '320x50': '/banners/linkspin-320x50.svg' }; +// neutral file names on purpose: EasyList blocks any URL with an IAB size token like '-728x90.' (Marty's own blocker hid +// the first zone test on stackpol.com, 2026-10-08) +const HOUSE = { '728x90': '/art/house-leader.svg', '468x60': '/art/house-strip.svg', '300x250': '/art/house-box.svg', '336x280': '/art/house-panel.svg', '250x250': '/art/house-square.svg', '125x125': '/art/house-tile.svg', '160x600': '/art/house-tower.svg', '120x600': '/art/house-column.svg', '320x50': '/art/house-bar.svg' }; const NAS_SIZES = new Set(['728x90', '468x60']); // the sizes Network Ad Space serves through its showadss.php tag const NAS_TAG = (w, h) => ''; const BOT = /bot|crawl|spider|slurp|facebookexternalhit|preview|telegrambot|whatsapp|curl|wget|python-requests|headless/i;