diff --git a/promokit.js b/promokit.js new file mode 100644 index 0000000..3c2cf1f --- /dev/null +++ b/promokit.js @@ -0,0 +1,106 @@ +// Promo kit (Marty 2026-11-14): the ONE place the Viral Banner Blitz creatives and swipe copy live. Published as a small public JSON +// feed, GET /api/promo-kit?u=, read by this site's /promote page and by InstantAdPay's promo center +// ("Network sites"). Change a line or a creative here and every place that shows the kit updates. +// Facts come from config.js (free post credit per day for network members, visitors per shift, network ad views per cycle, prize +// floor). The prize pot is shown only as "at least" the floor: the cap is internal and never shown. Packages are coming soon, so +// nothing here sells anything. Copy rules: advertising, not income; no em dashes. +// Creatives: public/art/kit/vbb--.png, rendered by tools/kit-art.mjs (neutral names: no IAB size tokens). +'use strict'; +const fs = require('fs'); +const path = require('path'); +const C = require('./config').get(); + +const KIT_DIR = path.join(__dirname, 'public', 'art', 'kit'); +const SHAPES = { tile: [125, 125, 'Square button (loop size)'], strip: [468, 60, 'Strip'], leader: [728, 90, 'Leaderboard'], box: [300, 250, 'Box'], + tower: [160, 600, 'Skyscraper'], social: [1200, 630, 'Social share'], square: [1080, 1080, 'Square post'] }; +const ANGLES = { free: 'Free daily banner post', loop: 'Every visitor pushes the loop', prize: 'Weekly leaderboard prizes' }; + +function copy() { + const n = x => Number(x || 0).toLocaleString('en-US'); + const floor = '$' + n(C.prizePot.floorUsd); + const shift = C.perShift === 1 ? 'Every verified visitor shifts' : 'Every ' + n(C.perShift) + ' verified visitors shift'; + const views = n(C.viewsPerCycle) + ' network ad views'; + return { + lines: [ + 'InstantAdPay or LinkSpin member? Post a 125x125 banner on Viral Banner Blitz free every day you sign in. {{LINK}}', + 'Every real visitor pushes the Viral Banner Blitz loop forward. When your banner rides out, it earns network ad views. {{LINK}}', + 'Weekly leaderboards for the most visitors sent. The prize pot is at least ' + floor + ' a week, paid in POL. {{LINK}}', + 'No subscription. Sign in with InstantAdPay or LinkSpin, post your banner, share your link. {{LINK}}', + 'One shared loop of 125x125 banners. Real visitors only, bots and repeat visits do not count. {{LINK}}' + ], + headlines: ['Post a Banner Free Every Day', 'Every Visitor Pushes the Loop', 'Send Visitors, Climb the Weekly Leaderboard'], + email: { + subject: 'Post your banner free every day', + body: [ + 'Hi,', + '', + 'Viral Banner Blitz is one shared loop of 125x125 banners, and every visitor moves it.', + '', + 'If you are an InstantAdPay or LinkSpin member, you get a free post credit every day you sign in. Post a banner and a link and it joins the loop.', + '', + shift + ' every banner one place. When yours rides out the end, it has cycled and earns ' + views + '. Bots and repeat visits do not count.', + '', + 'There are weekly leaderboards too, for the most visitors sent and the most traffic sources. The prize pot is at least ' + floor + ' a week, paid in POL to the top three on each board.', + '', + 'It is advertising, not an income program, and there is no subscription.', + '', + 'Here is my link:', + '{{LINK}}' + ].join('\n') + }, + posts: [ + 'If you are on InstantAdPay or LinkSpin, you can post a 125x125 banner on Viral Banner Blitz free every day. Real visitors push the loop, and when your banner rides out it earns network ad views.\n\n{{LINK}}', + 'Viral Banner Blitz has weekly leaderboards: most visitors sent and most traffic sources. The prize pot is at least ' + floor + ' a week, paid in POL. Share your link and climb.\n\n{{LINK}}' + ] + }; +} +const NOTE = 'A banner that cycles earns advertising across the network, not cash. Nothing here is an income opportunity.'; + +const REF_RE = /^(?:[A-Za-z0-9_.-]{2,40}|0x[0-9a-fA-F]{40})$/; +const base = () => 'https://' + C.site; +let files = null; +function creatives() { + if (files) return files; + let names = []; try { names = fs.readdirSync(KIT_DIR).filter(f => /^vbb-[a-z]+-[a-z]+\.png$/.test(f)); } catch (e) {} + const out = []; + for (const angle of Object.keys(ANGLES)) for (const shape of Object.keys(SHAPES)) { + const f = 'vbb-' + angle + '-' + shape + '.png'; if (!names.includes(f)) continue; + const [w, h, label] = SHAPES[shape]; + out.push({ key: angle + '-' + shape, angle, angleLabel: ANGLES[angle], shape, label, w, h, url: base() + '/art/kit/' + f }); + } + return (files = out); +} +function kit(u) { + const ref = REF_RE.test(String(u || '')) ? String(u) : ''; + const q = ref ? '?ref=' + encodeURIComponent(ref) : ''; + const link = base() + '/' + q; + const fill = s => s.split('{{LINK}}').join(link); + const t = copy(); + return { + v: 1, site: C.site, name: C.siteName, updated: '2026-11-14', username: ref || null, + tagline: 'One shared loop of 125x125 banners. Real visitors push it.', + links: [ + { key: 'home', label: 'Your link (the loop)', url: link }, + { key: 'how', label: 'How it works', url: base() + '/how' + q }, + { key: 'leaders', label: 'Weekly leaderboards', url: base() + '/leaders' + q } + ], + linkTemplate: base() + '/?ref={username}', + creatives: creatives().map(c => Object.assign({}, c, { html: 'Viral Banner Blitz' })), + lines: t.lines.map(fill), headlines: t.headlines, email: { subject: t.email.subject, body: fill(t.email.body) }, posts: t.posts.map(fill), + note: NOTE, promotePage: base() + '/promote' + }; +} + +// GET /api/promo-kit: public, CORS open (InstantAdPay reads it from the member's browser). /art/kit/* is served by the /art/ route. +// GET /promote: the member Promote page (public/promote.html). +function handle(req, res, u, sendFile) { + if (u.pathname === '/promote' && (req.method === 'GET' || req.method === 'HEAD') && sendFile) { sendFile(res, path.join(__dirname, 'public', 'promote.html')); return true; } + if (u.pathname !== '/api/promo-kit') return false; + const cors = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow-Headers': 'Content-Type' }; + if (req.method === 'OPTIONS') { res.writeHead(204, cors); res.end(); return true; } + if (req.method !== 'GET' && req.method !== 'HEAD') return false; + res.writeHead(200, Object.assign({ 'Content-Type': 'application/json', 'Cache-Control': 'public, max-age=300', 'X-Content-Type-Options': 'nosniff' }, cors)); + res.end(JSON.stringify(kit(u.searchParams.get('u')))); return true; +} + +module.exports = { kit, handle, creatives }; diff --git a/public/admin.html b/public/admin.html index eb1114a..fd19903 100644 --- a/public/admin.html +++ b/public/admin.html @@ -22,7 +22,7 @@ - +
@@ -35,7 +35,7 @@
- + diff --git a/public/art/kit/vbb-free-box.png b/public/art/kit/vbb-free-box.png new file mode 100644 index 0000000..cc59330 Binary files /dev/null and b/public/art/kit/vbb-free-box.png differ diff --git a/public/art/kit/vbb-free-leader.png b/public/art/kit/vbb-free-leader.png new file mode 100644 index 0000000..1bba447 Binary files /dev/null and b/public/art/kit/vbb-free-leader.png differ diff --git a/public/art/kit/vbb-free-social.png b/public/art/kit/vbb-free-social.png new file mode 100644 index 0000000..ff155ee Binary files /dev/null and b/public/art/kit/vbb-free-social.png differ diff --git a/public/art/kit/vbb-free-square.png b/public/art/kit/vbb-free-square.png new file mode 100644 index 0000000..15afb6e Binary files /dev/null and b/public/art/kit/vbb-free-square.png differ diff --git a/public/art/kit/vbb-free-strip.png b/public/art/kit/vbb-free-strip.png new file mode 100644 index 0000000..ed89539 Binary files /dev/null and b/public/art/kit/vbb-free-strip.png differ diff --git a/public/art/kit/vbb-free-tile.png b/public/art/kit/vbb-free-tile.png new file mode 100644 index 0000000..46cae7a Binary files /dev/null and b/public/art/kit/vbb-free-tile.png differ diff --git a/public/art/kit/vbb-free-tower.png b/public/art/kit/vbb-free-tower.png new file mode 100644 index 0000000..a1d5850 Binary files /dev/null and b/public/art/kit/vbb-free-tower.png differ diff --git a/public/art/kit/vbb-loop-box.png b/public/art/kit/vbb-loop-box.png new file mode 100644 index 0000000..ae2e5b8 Binary files /dev/null and b/public/art/kit/vbb-loop-box.png differ diff --git a/public/art/kit/vbb-loop-leader.png b/public/art/kit/vbb-loop-leader.png new file mode 100644 index 0000000..28d86d9 Binary files /dev/null and b/public/art/kit/vbb-loop-leader.png differ diff --git a/public/art/kit/vbb-loop-social.png b/public/art/kit/vbb-loop-social.png new file mode 100644 index 0000000..25094bc Binary files /dev/null and b/public/art/kit/vbb-loop-social.png differ diff --git a/public/art/kit/vbb-loop-square.png b/public/art/kit/vbb-loop-square.png new file mode 100644 index 0000000..fd3f2d6 Binary files /dev/null and b/public/art/kit/vbb-loop-square.png differ diff --git a/public/art/kit/vbb-loop-strip.png b/public/art/kit/vbb-loop-strip.png new file mode 100644 index 0000000..825882b Binary files /dev/null and b/public/art/kit/vbb-loop-strip.png differ diff --git a/public/art/kit/vbb-loop-tile.png b/public/art/kit/vbb-loop-tile.png new file mode 100644 index 0000000..669ea7c Binary files /dev/null and b/public/art/kit/vbb-loop-tile.png differ diff --git a/public/art/kit/vbb-loop-tower.png b/public/art/kit/vbb-loop-tower.png new file mode 100644 index 0000000..83a8cc8 Binary files /dev/null and b/public/art/kit/vbb-loop-tower.png differ diff --git a/public/art/kit/vbb-prize-box.png b/public/art/kit/vbb-prize-box.png new file mode 100644 index 0000000..58c3203 Binary files /dev/null and b/public/art/kit/vbb-prize-box.png differ diff --git a/public/art/kit/vbb-prize-leader.png b/public/art/kit/vbb-prize-leader.png new file mode 100644 index 0000000..2768b31 Binary files /dev/null and b/public/art/kit/vbb-prize-leader.png differ diff --git a/public/art/kit/vbb-prize-social.png b/public/art/kit/vbb-prize-social.png new file mode 100644 index 0000000..fbfd3e0 Binary files /dev/null and b/public/art/kit/vbb-prize-social.png differ diff --git a/public/art/kit/vbb-prize-square.png b/public/art/kit/vbb-prize-square.png new file mode 100644 index 0000000..f0b5d0d Binary files /dev/null and b/public/art/kit/vbb-prize-square.png differ diff --git a/public/art/kit/vbb-prize-strip.png b/public/art/kit/vbb-prize-strip.png new file mode 100644 index 0000000..87026e8 Binary files /dev/null and b/public/art/kit/vbb-prize-strip.png differ diff --git a/public/art/kit/vbb-prize-tile.png b/public/art/kit/vbb-prize-tile.png new file mode 100644 index 0000000..0580fca Binary files /dev/null and b/public/art/kit/vbb-prize-tile.png differ diff --git a/public/art/kit/vbb-prize-tower.png b/public/art/kit/vbb-prize-tower.png new file mode 100644 index 0000000..2c55491 Binary files /dev/null and b/public/art/kit/vbb-prize-tower.png differ diff --git a/public/assets/common.js b/public/assets/common.js index ca9ffb9..1a33dc7 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -13,7 +13,7 @@ window.VBB = (function () { function renderNav(active) { const nav = document.createElement('nav'); nav.className = 'top'; - const links = [['/', 'The loop'], ['/leaders', 'Leaderboards'], ['/how', 'How it works'], ['/packages', 'Packages'], ['/my', 'My Banners']]; + const links = [['/', 'The loop'], ['/leaders', 'Leaderboards'], ['/how', 'How it works'], ['/packages', 'Packages'], ['/promote', 'Promote'], ['/my', 'My Banners']]; nav.innerHTML = ''; @@ -21,11 +21,33 @@ window.VBB = (function () { // inside a traffic-exchange frame, the member page opens in a new tab if (framed) document.querySelectorAll('nav a[href="/my"]').forEach(a => { a.target = '_blank'; a.rel = 'noopener'; }); } + // network ad zones (Marty 2026-11-14, the Downline Banners pattern): LinkSpin zones on Marty's account, one per placement, each + // mounted once with a small 'Network' label. Footer (wide / phone), Leaderboards, My Banners, How it works; the 404 zone is in + // server.js. NEVER on the loop page (/) or admin. An empty id = that placement stays off. + const ZONES = { footWide: '', footPhone: '', leaders: '', my: '', how: '' }; + function zone(el, key) { + if (!el || el.dataset.zoned || !ZONES[key]) return; el.dataset.zoned = '1'; el.classList.add('net-zone'); + const lab = document.createElement('div'); lab.className = 'net-zone-label'; lab.textContent = 'Network'; + const s = document.createElement('script'); s.async = true; s.src = 'https://linkspin.app/z.js'; s.setAttribute('data-zone', ZONES[key]); + el.appendChild(lab); el.appendChild(s); + } + function slot(after) { if (!after || !after.parentNode) return null; const d = document.createElement('div'); d.className = 'net-zone-slot'; after.parentNode.insertBefore(d, after.nextSibling); return d; } + function pageZones() { + const p = location.pathname.replace(/\/$/, '') || '/'; + if (p === '/' || p === '/admin') return; + const card = id => { const el = $(id); return el ? el.closest('.card') : null; }; + if (p === '/leaders') zone(slot(card('lbVisitors')), 'leaders'); + if (p === '/my') zone(slot($('stats')), 'my'); + if (p === '/how') zone(slot(document.querySelectorAll('main .card')[1]), 'how'); + const za = document.createElement('div'); za.className = 'wrap net-zone-foot'; document.body.appendChild(za); + zone(za, window.innerWidth >= 760 ? 'footWide' : 'footPhone'); + } function renderFooter() { + pageZones(); const f = document.createElement('footer'); f.className = 'foot'; f.innerHTML = '

Viral Banner Blitz, part of the Crypto Team Build Network

' + '

A banner that cycles earns advertising across the network, not cash. Nothing here is an income opportunity.

' - + '

The loop · Leaderboards · How it works · Packages · My Banners

'; + + '

The loop · Leaderboards · How it works · Packages · Promote · My Banners

'; document.body.appendChild(f); toasts(); } diff --git a/public/assets/kit.css b/public/assets/kit.css new file mode 100644 index 0000000..da4faf9 --- /dev/null +++ b/public/assets/kit.css @@ -0,0 +1,21 @@ +/* Promote page (2026-11-14), pop-art look. Neutral class names (kit-*), no ad/banner words. */ +.kit-who{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px} +.kit-who input{flex:1 1 220px;min-width:0;background:var(--bg2);border:var(--edge);border-radius:10px;padding:11px 12px;color:var(--ink);font:14px var(--mono)} +.kit-who input:focus{outline:3px solid var(--sky);outline-offset:1px} +.kit-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 0;border-top:2px dashed var(--line)} +.kit-row:first-of-type{border-top:0} +.kit-l{flex:1 1 260px;min-width:0;display:flex;flex-direction:column;gap:3px} +.kit-lab{display:block;font:700 11px var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.1em} +.kit-url{font-family:var(--mono);font-size:13.5px;overflow-wrap:anywhere;color:var(--sky);font-weight:700} +.kit-txt{flex:1 1 300px;margin:0;min-width:0} +.kit-pre{white-space:pre-wrap;font-family:var(--body);font-size:14.5px;line-height:1.55;margin:10px 0 0;padding:12px 14px;border-radius:12px;border:var(--edge);background:var(--bg2);overflow-wrap:anywhere} +.kit-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 16px} +.kit-tab{font:800 14px/1 var(--disp);padding:9px 13px;border-radius:999px;border:2.5px solid var(--ink);background:var(--panel);color:var(--ink);cursor:pointer;box-shadow:var(--shadow-sm)} +.kit-tab.on{background:var(--amber)} +.kit-set{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start} +.kit-fig{margin:0;display:flex;flex-direction:column;gap:8px;max-width:100%} +.kit-fig img{display:block;max-width:100%;height:auto;border-radius:6px} +.kit-social img{width:600px} .kit-square img{width:360px} +.kit-fig figcaption{font-size:13px;display:flex;flex-wrap:wrap;gap:6px;align-items:center} +.kit-acts{display:flex;gap:6px;flex-wrap:wrap;width:100%} +.kit-note{margin:6px 0 24px} diff --git a/public/assets/kitpage.js b/public/assets/kitpage.js new file mode 100644 index 0000000..cc1aa80 --- /dev/null +++ b/public/assets/kitpage.js @@ -0,0 +1,49 @@ +// Promote page renderer (2026-11-14). Draws a promo kit (GET /api/promo-kit) into a container: links, creatives grouped by angle, +// swipe lines, headlines, an email and social posts, each with a copy button. Same file on Downline Banners and Viral Banner Blitz; +// the page script decides the username and the look comes from the site's own CSS (.card, .btn, .kit-*). +window.KitPage = (function () { + const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c])); + async function copy(text, btn) { + try { await navigator.clipboard.writeText(text); } catch (e) { + const t = document.createElement('textarea'); t.value = text; document.body.appendChild(t); t.select(); try { document.execCommand('copy'); } catch (e2) {} t.remove(); + } + if (btn) { const o = btn.textContent; btn.textContent = 'Copied'; setTimeout(() => { btn.textContent = o; }, 1400); } + } + const TXT = []; + const cb = (text, label, cls) => { TXT.push(text); return ''; }; + // on the kit's own site, show creatives from this origin (same files; the copied URL stays absolute) + function local(url, k) { try { const u = new URL(url); return u.hostname === k.site && location.hostname !== k.site ? u.pathname : url; } catch (e) { return url; } } + function render(root, k) { + TXT.length = 0; + const angles = []; const by = {}; + (k.creatives || []).forEach(c => { if (!by[c.angle]) { by[c.angle] = []; angles.push(c); } by[c.angle].push(c); }); + let h = ''; + h += '

Your links

' + (k.username ? '

Every link, creative and line below carries ' + esc(k.username) + '.

' : '

Add your network username above so these links carry it.

') + + k.links.map(l => '
' + esc(l.label) + '' + esc(l.url) + '
' + cb(l.url, 'Copy link', '') + '
').join('') + '
'; + h += '

Creatives

Download them, or copy the HTML: it already links to you.

' + + angles.map((c, i) => '').join('') + '
'; + angles.forEach((a, i) => { + h += '
' + by[a.angle].map(c => + '
' + esc(k.name + ', ' + c.label) + '' + + '
' + esc(c.label) + ' ' + c.w + 'x' + c.h + 'Download' + cb(c.url, 'Copy URL') + cb(c.html, 'Copy HTML') + '
').join('') + '
'; + }); + h += '
'; + h += '

Short lines

For chats, comments, text ads and signatures.

' + k.lines.map(t => '

' + esc(t) + '

' + cb(t) + '
').join('') + '
'; + h += '

Headlines

' + k.headlines.map(t => '

' + esc(t) + '

' + cb(t) + '
').join('') + '
'; + h += '

Email

Subject' + esc(k.email.subject) + '

' + cb(k.email.subject, 'Copy subject') + '
' + + '
' + esc(k.email.body) + '
' + cb(k.email.body, 'Copy email') + '
'; + h += '

Social posts

' + k.posts.map(t => '
' + esc(t) + '
' + cb(t, 'Copy post') + '
').join('') + '
'; + if (k.note) h += '

' + esc(k.note) + '

'; + root.innerHTML = h; + root.querySelectorAll('[data-kc]').forEach(b => b.addEventListener('click', () => copy(TXT[Number(b.dataset.kc)], b))); + root.querySelectorAll('[data-ka]').forEach(b => b.addEventListener('click', () => { + root.querySelectorAll('[data-ka]').forEach(x => x.classList.toggle('on', x === b)); + root.querySelectorAll('[data-ks]').forEach(s => { s.hidden = s.dataset.ks !== b.dataset.ka; }); + })); + } + async function load(root, u) { + const r = await fetch('/api/promo-kit' + (u ? '?u=' + encodeURIComponent(u) : ''), { cache: 'no-store' }); + const k = await r.json(); render(root, k); return k; + } + return { render, load, copy }; +})(); diff --git a/public/assets/promote.js b/public/assets/promote.js new file mode 100644 index 0000000..43c8656 --- /dev/null +++ b/public/assets/promote.js @@ -0,0 +1,25 @@ +// Promote page (2026-11-14): the promo kit from /api/promo-kit with the member's network username in every link. +// Username: ?u= first, then the signed-in member's (My Banners), then the last one typed here (this browser only). +(async function () { + VBB.renderNav('/promote'); VBB.renderFooter(); + const $ = VBB.$; const RE = /^(?:[A-Za-z0-9_.-]{2,40}|0x[0-9a-fA-F]{40})$/; + let u = new URLSearchParams(location.search).get('u') || ''; + let signed = false; + if (!RE.test(u)) { + u = ''; + try { const me = await VBB.getJSON('/api/me'); if (me.signedIn) { u = me.username || me.address || ''; signed = true; } } catch (e) {} + } + if (!u) { try { u = localStorage.getItem('kit.u') || ''; } catch (e) {} if (!RE.test(u)) u = ''; } + $('whoIn').value = u; + if (signed) $('whoNote').textContent = 'Signed in: your links below use ' + (u.startsWith('0x') ? 'your wallet (no network username found yet)' : '@' + u) + '.'; + async function show(name) { + try { await KitPage.load($('kit'), name); VBB.status(''); } catch (e) { VBB.status('Could not load the kit. Try again in a moment.', 'err'); } + } + $('whoForm').addEventListener('submit', e => { + e.preventDefault(); const v = $('whoIn').value.trim().replace(/^@/, ''); + if (v && !RE.test(v)) return VBB.status('That does not look like a username: letters, numbers, dot, dash or underscore.', 'err'); + try { localStorage.setItem('kit.u', v); } catch (e2) {} + show(v); + }); + show(u); +})(); diff --git a/public/assets/vbb.css b/public/assets/vbb.css index 6e0f8fe..760da56 100644 --- a/public/assets/vbb.css +++ b/public/assets/vbb.css @@ -155,3 +155,6 @@ footer.foot a{color:var(--amber)} footer.foot p{margin:6px 0} .toast.in{opacity:1;transform:rotate(-1deg)} .toast span{color:var(--muted);font-size:12.5px} [hidden]{display:none!important} @media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}} +/* network zones (2026-11-14): neutral class names, centered, small label */ +.net-zone{display:flex;flex-direction:column;align-items:center;gap:4px;margin:18px auto;max-width:100%;overflow:hidden} +.net-zone-label{font:700 10.5px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)} diff --git a/public/how.html b/public/how.html index f005bdc..c452678 100644 --- a/public/how.html +++ b/public/how.html @@ -22,7 +22,7 @@ - +
@@ -49,7 +49,7 @@
- + diff --git a/public/index.html b/public/index.html index 67572fc..2caebc6 100644 --- a/public/index.html +++ b/public/index.html @@ -23,7 +23,7 @@ - +
@@ -55,7 +55,7 @@
- + diff --git a/public/leaders.html b/public/leaders.html index b5235ba..c84a110 100644 --- a/public/leaders.html +++ b/public/leaders.html @@ -22,7 +22,7 @@ - +
@@ -32,7 +32,7 @@

Most traffic sources

Different websites your visitors came from (the referring site), so spreading your link widely counts.

- + diff --git a/public/my.html b/public/my.html index a788f0f..80ad67a 100644 --- a/public/my.html +++ b/public/my.html @@ -22,7 +22,7 @@ - +
@@ -73,7 +73,7 @@
- + diff --git a/public/packages.html b/public/packages.html index db9d239..dd4476f 100644 --- a/public/packages.html +++ b/public/packages.html @@ -22,7 +22,7 @@ - +
@@ -40,7 +40,7 @@

Until packages open, every network member (InstantAdPay or LinkSpin) gets one free post credit each day they sign in.

Use my free credit
- + diff --git a/public/promote.html b/public/promote.html new file mode 100644 index 0000000..aaaee08 --- /dev/null +++ b/public/promote.html @@ -0,0 +1,41 @@ + + + + +Promote | Viral Banner Blitz + + + + + + + + + + + + + + + + + + + + + + + +
+
Share the loop

Promote Viral Banner Blitz

Your links, creatives in every common size, and copy you can paste anywhere. Everything carries your network username.

+

Your network username

+

Your InstantAdPay or LinkSpin username works here. Sign in on My Banners and it fills in by itself.

+
+ +

Loading the kit...

+
+ + + + + diff --git a/qa/smoke.mjs b/qa/smoke.mjs index a6f88f2..fe1c798 100644 --- a/qa/smoke.mjs +++ b/qa/smoke.mjs @@ -155,6 +155,34 @@ async function main() { ok(sp.loopSize === 5 && sp.perShift === 3 && sp.progress === 0 && sp.loop.length === 0 && sp.waiting === 0, 'empty loop at start', sp); for (const pth of ['/leaders', '/how', '/packages', '/robots.txt', '/sitemap.xml', '/art/mark.svg', '/assets/vbb.css', '/assets/splash.js']) { r = await anon.req(pth); ok(r.status === 200, 'GET ' + pth + ' 200', r.status); } r = await anon.req('/my'); ok(r.status === 200 && r.headers.get('x-frame-options') === 'DENY', '/my served, never framed'); + // promo kit (2026-11-14): one public feed read by /promote and by InstantAdPay's promo center + { + const kr = await anon.req('/api/promo-kit?u=smokeleader'); const k = await kr.json(); + ok(kr.status === 200 && kr.headers.get('access-control-allow-origin') === '*', 'promo kit: GET /api/promo-kit 200 with CORS open', kr.status); + ok(k.username === 'smokeleader' && k.links.length === 3 && k.links.every(l => l.url.startsWith('https://viralbannerblitz.com/') && l.url.endsWith('?ref=smokeleader')), 'promo kit: every link carries ?ref=', k.links); + ok(k.lines.length === 5 && k.headlines.length === 3 && k.posts.length === 2 && k.email && k.email.subject && k.email.body.includes('?ref=smokeleader'), 'promo kit: 5 lines, 3 headlines, 1 email, 2 posts, link filled in'); + const words = JSON.stringify([k.lines, k.headlines, k.email, k.posts, k.note, k.tagline]); + ok(!/[—–]/.test(words) && !/\$50|passive income|guaranteed (income|returns|profit)|earn (cash|money)|make money/i.test(words) && /at least \$20/.test(words), 'promo kit copy: no dashes, no cap, no income promises, pot shown as at least $20'); + ok(k.creatives.length === 21 && new Set(k.creatives.map(c => c.angle)).size === 3, 'promo kit: 21 creatives in 3 angles', k.creatives.length); + const badName = k.creatives.filter(c => /\d{2,4}x\d{2,4}|banner|[-_/]ads?[-_./]/i.test(c.url.replace('https://viralbannerblitz.com', ''))); + ok(badName.length === 0, 'promo kit: creative paths are ad-blocker neutral (no size tokens, no banner/ad words)', badName.map(c => c.url)); + let dimOk = true; const dimBad = []; + for (const c of k.creatives) { + const rr = await anon.req(new URL(c.url).pathname); const buf = Buffer.from(await rr.arrayBuffer()); + const w = buf.readUInt32BE(16), h = buf.readUInt32BE(20); + if (rr.status !== 200 || rr.headers.get('content-type') !== 'image/png' || w !== c.w || h !== c.h) { dimOk = false; dimBad.push(c.key + ' ' + rr.status + ' ' + w + 'x' + h); } + if (!c.html.includes('href="https://viralbannerblitz.com/?ref=smokeleader"')) { dimOk = false; dimBad.push(c.key + ' html'); } + } + ok(dimOk, 'promo kit: every creative is served as PNG at its exact size, HTML links to the member', dimBad); + const k2 = await (await anon.req('/api/promo-kit?u=' + encodeURIComponent('x'))).json(); + ok(k2.username === null && k2.links[0].url === 'https://viralbannerblitz.com/', 'promo kit: a bad username is ignored (plain links)', k2.links[0]); + r = await anon.req('/promote'); const ph = await r.text(); + ok(r.status === 200 && /id="kit"/.test(ph) && /kitpage\.js/.test(ph), 'GET /promote serves the Promote page'); + r = await anon.req('/no-such-page'); const nf = await r.text(); + ok(r.status === 404 && /Back to the loop/.test(nf), '404 page served'); + ok(/script-src[^;]*https:\/\/linkspin\.app/.test(r.headers.get('content-security-policy') || ''), 'CSP admits linkspin.app (network zones)'); + r = await anon.req('/sitemap.xml'); ok((await r.text()).includes('/promote'), 'sitemap lists /promote'); + } r = await anon.req('/api/my'); ok(r.status === 401, '/api/my needs sign-in'); console.log('4. members: wallet sign-in and network sign-in'); @@ -405,6 +433,13 @@ async function main() { await pg.goto(BASE + '/my', { waitUntil: 'domcontentloaded' }); await pg.waitForSelector('#dash:not([hidden])', { timeout: 8000 }); ok((await pg.inputValue('#share')).endsWith('?ref=smokeleader'), name + ': My Banners shows the share link'); await pg.screenshot({ path: path.join(OUT, 'my-' + name + '.png'), fullPage: true }); + // Promote page, signed in: the kit fills in the member's username + await pg.goto(BASE + '/promote', { waitUntil: 'domcontentloaded' }); await pg.waitForSelector('#kit .kit-fig img', { timeout: 8000 }); + ok((await pg.textContent('#kit')).includes('?ref=smokeleader') && (await pg.inputValue('#whoIn')) === 'smokeleader', name + ': Promote page shows the kit with the member links'); + ok(!!(await pg.$('nav a[href="/promote"]')), name + ': nav links to Promote'); + await pg.waitForTimeout(600); await pg.screenshot({ path: path.join(OUT, 'promote-' + name + '.png'), fullPage: true }); + await pg.goto(BASE + '/', { waitUntil: 'domcontentloaded' }); await pg.waitForTimeout(300); + ok(!(await pg.$('script[src*="linkspin.app/z.js"]')), name + ': no network zone on the loop page'); await ctx.close(); } ok(errs.length === 0, 'no page errors', errs); diff --git a/server.js b/server.js index 8ccd29d..2d7b333 100644 --- a/server.js +++ b/server.js @@ -19,6 +19,7 @@ const loop = require('./loop'); const safety = require('./safety'); const networksso = require('./networksso'); const shop = require('./shop'); +const promokit = require('./promokit'); // promo kit feed /api/promo-kit + the /promote page (2026-11-14) const hubreport = require('./hubreport'); // network hub report by wallet (off unless HUB_ENABLED) const PUB = path.join(__dirname, 'public'); @@ -37,8 +38,8 @@ const hash = s => crypto.createHmac('sha256', SECRET).update(s).digest('hex').sl // ---- http helpers ---- const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': 'text/javascript', '.png': 'image/png', '.jpg': 'image/jpeg', '.gif': 'image/gif', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.json': 'application/json', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml' }; -const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " - + "img-src 'self' data: blob: https:; connect-src 'self' https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org " +const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://linkspin.app; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " + + "img-src 'self' data: blob: https:; connect-src 'self' https://linkspin.app https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org " + "https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com; " + "font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: 'self'"; function headers(extra) { return Object.assign({ 'Content-Security-Policy': CSP, 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin' }, extra || {}); } @@ -207,6 +208,9 @@ function oldLink(u) { return net ? '/?ref=' + encodeURIComponent(net) : '/'; } +// network ad zone on the 404 page (LinkSpin zone on Marty's account, 300x250; the page zones live in public/assets/common.js ZONES). '' = none +const ZONE_404 = ''; + const PAGES = { '/': 'index.html', '/my': 'my.html', '/leaders': 'leaders.html', '/how': 'how.html', '/packages': 'packages.html', '/admin': 'admin.html' }; const challenges = new Map(); const clickSeen = new Map(); @@ -217,6 +221,7 @@ const server = http.createServer(async (req, res) => { if (C.isProd && host !== C.site && host.endsWith('.' + C.site)) { res.writeHead(301, { Location: 'https://' + C.site + req.url, 'Cache-Control': 'no-store' }); return res.end(); } } try { if (req.method === 'GET' && (p.startsWith('/sso/') || p === '/api/sso/status') && await networksso.handle(req, res, u)) return; + if ((p === '/api/promo-kit' || p === '/promote') && promokit.handle(req, res, u, sendFile)) return; if (req.method === 'GET' || req.method === 'HEAD') { if (p === '/health') return json(res, 200, { ok: true, store: docstore.isOn() ? 'mysql' : 'files' }); @@ -231,7 +236,7 @@ const server = http.createServer(async (req, res) => { if (/^\/r\/[^/]+$/.test(p)) { res.writeHead(302, { Location: '/?ref=' + encodeURIComponent(decodeURIComponent(p.slice(3))) }); return res.end(); } if (p === '/sitemap.xml') { const day = new Date().toISOString().slice(0, 10); - const urls = ['/', '/leaders', '/how', '/packages'].map(x => 'https://' + C.site + x + '' + day + '').join(''); + const urls = ['/', '/leaders', '/how', '/packages', '/promote'].map(x => 'https://' + C.site + x + '' + day + '').join(''); res.writeHead(200, headers({ 'Content-Type': 'application/xml; charset=utf-8', 'Cache-Control': 'public, max-age=3600' })); return res.end('' + urls + ''); } @@ -411,7 +416,8 @@ const server = http.createServer(async (req, res) => { if (p.startsWith('/api/')) return json(res, 404, { error: 'Not found' }); res.writeHead(404, headers({ 'Content-Type': 'text/html; charset=utf-8' })); - return res.end('Not found

Not found. Back to the loop

'); + return res.end('Not found

Not found. Back to the loop

' + + (ZONE_404 ? '

Network

' : '') + ''); } catch (e) { console.error('request', p, e.message); if (!res.headersSent) json(res, 500, { error: 'Server error' }); diff --git a/tools/kit-art.mjs b/tools/kit-art.mjs new file mode 100644 index 0000000..c1b0c2a --- /dev/null +++ b/tools/kit-art.mjs @@ -0,0 +1,196 @@ +// Promo kit art for Downline Banners and Viral Banner Blitz (2026-11-14). Renders every creative from HTML with Playwright so +// the text is crisp, at the exact pixel size of each slot. Same file in both repos (banner-line/app/tools, vbb/app/tools). +// node tools/kit-art.mjs dlb|vbb|all +// Output: /public/art/kit/--.png. Neutral names on purpose: no IAB size tokens, no "banner"/"ad" +// (EasyList hides those). The copy here must match the facts in each app (DLB SPEC.md + contract, VBB config.js + how.html). +import { pathToFileURL } from 'url'; +import fs from 'fs'; +import path from 'path'; +const PW = process.env.PLAYWRIGHT || 'D:/Projects/MarketingAgent/qa-tester/node_modules/playwright/index.js'; +const pwm = await import(pathToFileURL(PW).href); const chromium = pwm.chromium || (pwm.default && pwm.default.chromium); + +const ROOT = 'D:/Projects/HighRisk'; +const SHAPES = { tile: [125, 125], strip: [468, 60], leader: [728, 90], box: [300, 250], tower: [160, 600], social: [1200, 630], square: [1080, 1080] }; + +const SITES = { + dlb: { + out: ROOT + '/banner-line/app/public/art/kit', domain: 'downlinebanners.com', name: ['Downline', 'Banners'], + mark: fs.readFileSync(ROOT + '/banner-line/app/public/art/mark.svg', 'utf8'), + fonts: 'family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Inter:wght@500;600;700', + angles: { + spot: { eyebrow: '$5 spot', h1: 'A $5 spot.', h2: '300 guaranteed views.', line: 'A $5 spot. 300 guaranteed views.', sub: 'Your banner on the board, paid on-chain on Polygon.', cta: 'Get a spot', tA: '$5 spot', tB: '300 views', chips: ['$5 spot', '300 guaranteed views', 'Paid on-chain'] }, + line: { eyebrow: '10 levels', h1: '10 levels pay', h2: 'as spots sell after yours.', line: '10 levels pay as spots sell after yours', sub: 'Sponsor 30%. Each of 10 levels 5.5%. Fixed in the contract.', cta: 'See the line', tA: '10 levels', tB: 'paid on-chain', chips: ['Sponsor 30%', '10 levels x 5.5%', 'Splits fixed on-chain'] }, + instant: { eyebrow: 'Nothing to withdraw', h1: 'No withdrawals.', h2: 'Paid in the same transaction.', line: 'No withdrawals. Paid in the same transaction.', sub: 'A Polygon contract splits every $5 spot the moment it sells.', cta: 'See how', tA: 'No withdrawals', tB: 'paid same tx', chips: ['Same-transaction payouts', 'Verified contract', '$5 spot'] } + } + }, + vbb: { + out: ROOT + '/vbb/app/public/art/kit', domain: 'viralbannerblitz.com', name: ['Viral Banner', 'Blitz'], + mark: fs.readFileSync(ROOT + '/vbb/app/public/art/mark.svg', 'utf8'), + fonts: 'family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@500;700&family=Space+Mono:wght@700', + angles: { + free: { eyebrow: 'Free daily post', h1: 'Post a banner', h2: 'free every day.', line: 'Post a banner free every day', sub: 'InstantAdPay and LinkSpin members get a free post credit each day they sign in.', cta: 'Post yours', tA: 'FREE', tB: 'daily post', chips: ['125x125 banners', 'Free daily post', 'No subscription'] }, + loop: { eyebrow: 'Real visitors only', h1: 'Every visitor', h2: 'pushes the loop.', line: 'Every visitor pushes the loop', sub: 'Real visitors move every banner forward. Ride out and earn network ad views.', cta: 'Join the loop', tA: 'Every visit', tB: 'moves it', chips: ['Verified visitors', 'Bots do not count', 'Network ad views'] }, + prize: { eyebrow: 'Weekly leaderboards', h1: 'Send visitors.', h2: 'Climb the weekly board.', line: 'Weekly prizes, at least $20 a week', sub: 'Prize pot of at least $20 a week, paid in POL to the top three on each board.', cta: 'See the leaders', tA: 'Weekly', tB: 'prizes', chips: ['At least $20 a week', 'Paid in POL', 'Two leaderboards'] } + } + } +}; + +const esc = s => String(s).replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c])); +// shrink every .fit element until its text fits its box (one line or the box height) +const FIT = ``; + +function dlbCss() { + return ` + :root{--bg:#0b0913;--ink:#f3f1fa;--muted:#a29cbc;--lime:#c6f432;--mint:#7ef0c8;--cyan:#6fd8ff;--vio:#9b7bff} + *{box-sizing:border-box;margin:0;padding:0} + html,body{width:var(--w);height:var(--h);overflow:hidden} + body{font-family:Inter,system-ui,sans-serif;color:var(--ink);background: + radial-gradient(55% 70% at 18% 20%,rgba(155,123,255,.32),transparent 70%),radial-gradient(45% 60% at 85% 85%,rgba(198,244,50,.16),transparent 70%), + linear-gradient(160deg,#1c1733 0%,#0b0913 70%);position:relative} + body::after{content:"";position:absolute;inset:0;border:1px solid rgba(155,123,255,.45);pointer-events:none} + .g{background:linear-gradient(92deg,var(--lime) 5%,var(--mint) 55%,var(--cyan));-webkit-background-clip:text;background-clip:text;color:transparent} + .disp{font-family:"Bricolage Grotesque",system-ui,sans-serif;font-weight:800;letter-spacing:-.03em;line-height:1.02} + .mark svg{width:100%;height:100%;display:block} + .wm{font-family:"Bricolage Grotesque";font-weight:800;letter-spacing:-.03em;white-space:nowrap} + .eb{display:inline-block;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--lime);border:1.5px solid var(--lime);border-radius:999px;white-space:nowrap} + .cta{display:inline-flex;align-items:center;justify-content:center;font-family:"Bricolage Grotesque";font-weight:800;color:#0b0913;background:linear-gradient(92deg,var(--lime),var(--mint));border-radius:999px;white-space:nowrap} + .chip{display:inline-block;color:var(--muted);border:1.5px solid rgba(162,156,188,.35);border-radius:999px;font-weight:600;white-space:nowrap} + .chip:first-child{color:var(--lime);border-color:var(--lime)} + .sub{color:#cfc9e6} + .fit{white-space:nowrap;overflow:hidden;flex:none} + .h .g,.h .hot{width:fit-content;max-width:100%}`; +} +function vbbCss() { + return ` + :root{--bg:#fff4dc;--ink:#14121f;--hot:#ff2d87;--sky:#2b59ff;--amber:#ffd400;--mint:#14d9a0;--muted:#4d4862} + *{box-sizing:border-box;margin:0;padding:0} + html,body{width:var(--w);height:var(--h);overflow:hidden} + body{font-family:"DM Sans",system-ui,sans-serif;color:var(--ink);background:var(--bg);position:relative; + background-image:radial-gradient(rgba(255,45,135,.18) 1.4px,transparent 1.6px),radial-gradient(rgba(43,89,255,.13) 1.4px,transparent 1.6px); + background-size:22px 22px,22px 22px;background-position:0 0,11px 11px} + body::after{content:"";position:absolute;inset:0;border:var(--edge,3px) solid var(--ink);pointer-events:none} + .disp{font-family:"Bricolage Grotesque",system-ui,sans-serif;font-weight:800;letter-spacing:-.03em;line-height:1} + .hot{color:var(--hot);-webkit-text-stroke:var(--stroke,1px) var(--ink);text-shadow:var(--ts,3px) var(--ts,3px) 0 var(--amber)} + .mark svg{width:100%;height:100%;display:block} + .wm{font-family:"Bricolage Grotesque";font-weight:800;letter-spacing:-.03em;white-space:nowrap} + .wm b{color:var(--hot);-webkit-text-stroke:.6px var(--ink)} + .eb{display:inline-block;font-family:"Space Mono",monospace;font-weight:700;text-transform:uppercase;letter-spacing:.1em;background:var(--mint);border:2.5px solid var(--ink);border-radius:999px;box-shadow:3px 3px 0 var(--ink);transform:rotate(-1.5deg);white-space:nowrap} + .cta{display:inline-flex;align-items:center;justify-content:center;font-family:"Bricolage Grotesque";font-weight:800;color:#fff;background:var(--hot);border:2.5px solid var(--ink);border-radius:12px;box-shadow:4px 4px 0 var(--ink);white-space:nowrap} + .chip{display:inline-block;font-weight:700;border:2.5px solid var(--ink);border-radius:999px;background:#fff;box-shadow:3px 3px 0 var(--ink);white-space:nowrap} + .chip:nth-child(1){background:var(--amber)} .chip:nth-child(2){background:#dbe4ff} .chip:nth-child(3){background:#c9f7e6} + .sub{color:var(--muted)} + .fit{white-space:nowrap;overflow:hidden} + .tiles{position:absolute;display:grid;grid-template-columns:repeat(3,1fr);gap:var(--tg,14px)} + .tiles i{display:block;aspect-ratio:1;border:3px solid var(--ink);border-radius:12px;box-shadow:5px 5px 0 var(--ink)}`; +} +const VBB_TILE_COLORS = ['#ff2d87', '#2b59ff', '#ffd400', '#14d9a0', '#ffffff', '#ff2d87', '#14d9a0', '#2b59ff', '#ffffff', '#ffd400', '#2b59ff', '#ff2d87']; +const vTiles = (n, rot) => '
' + Array.from({ length: n }, (_, i) => '').join('') + '
'; + +function body(site, a, shape) { + const S = SITES[site]; const m = '
' + S.mark + '
'; const d = site === 'dlb'; + const wm = d ? 'Downline Banners' : 'Viral Banner Blitz'; + const h2 = d ? '' + esc(a.h2) + '' : '' + esc(a.h2) + ''; + const chips = a.chips.map(c => '' + esc(c) + '').join(''); + switch (shape) { + case 'tile': return `
${m}
${esc(a.tA)}
${esc(a.tB)}
${esc(S.domain)}
`; + case 'strip': return `
${m}
${esc(a.line)}
${esc(S.name.join(' '))} · ${esc(S.domain)}
${esc(a.cta)}
`; + case 'leader': return `
${m}
${esc(a.h1)} ${h2}
${esc(a.sub)}
${esc(a.cta)}
`; + case 'box': return `
${m}${wm}
${esc(a.eyebrow)}
${esc(a.h1)}${h2.replace('
${esc(a.sub)}
${esc(a.cta)} →
`; + case 'tower': return `
${m}${d ? 'Downline
Banners
' : 'Viral Banner Blitz'}${esc(a.eyebrow)}
${esc(a.h1)}${h2}
${esc(a.sub)}
${esc(a.cta)}
${esc(S.domain)}
`; + case 'social': return d ? `
${m}${wm}
${esc(a.eyebrow)}
${esc(a.h1)}${h2}
${esc(a.sub)}
${chips}${esc(S.domain)}
` + : `${vTiles(12)}
${esc(a.eyebrow)}
${esc(a.h1)}${h2}
${esc(a.sub)}
${m}${esc(S.domain)}
`; + case 'square': return d ? `
${m}${wm}
${esc(a.eyebrow)}
${esc(a.h1)}${h2}
${esc(a.sub)}
${chips}
${esc(S.domain)}
` + : `${vTiles(6)}
${m}${wm}
${esc(a.eyebrow)}
${esc(a.h1)}${h2}
${esc(a.sub)}
${chips}${esc(S.domain)}
`; + } +} + +function page(site, angle, shape) { + const S = SITES[site]; const [w, h] = SHAPES[shape]; + return ` + ${FIT}${body(site, S.angles[angle], shape)}`; +} + +const which = process.argv[2] || 'all'; +const browser = await chromium.launch(); +const made = []; let file0; +for (const site of Object.keys(SITES)) { + if (which !== 'all' && which !== site) continue; + const S = SITES[site]; fs.mkdirSync(S.out, { recursive: true }); + for (const angle of Object.keys(S.angles)) for (const shape of Object.keys(SHAPES)) { + const [w, h] = SHAPES[shape]; + const pg = await browser.newPage({ viewport: { width: w, height: h }, deviceScaleFactor: 1 }); + await pg.setContent(page(site, angle, shape), { waitUntil: 'networkidle' }); + if (process.env.DBG) console.log(file0 = shape, await pg.evaluate(async () => { await document.fonts.ready; return [...document.querySelectorAll('.fit')].map(el => [el.className, el.scrollWidth, el.clientWidth, el.scrollHeight, el.clientHeight]); })); + await pg.evaluate(async () => { await document.fonts.ready; window.__fit(); }); + const file = path.join(S.out, site + '-' + angle + '-' + shape + '.png'); + await pg.screenshot({ path: file, clip: { x: 0, y: 0, width: w, height: h } }); + await pg.close(); made.push(file); + } +} +await browser.close(); +console.log(made.length + ' files\n' + made.join('\n'));