From 71e2e2b48786e4ebdf703eea9cad9f0241c9d8b0 Mon Sep 17 00:00:00 2001 From: martbost Date: Tue, 17 Nov 2026 06:11:30 -0600 Subject: [PATCH] Promo tools > Network sites: ViralAdSource kit (creatives, lines, tracked links from its /api/promo-kit; src rewritten to iap inside copy and HTML too); CSP connect-src viraladsource.com; netsites CODES viraladsource nwvas; netkits.js?v=20261117vas Co-Authored-By: Claude Opus 5.5 --- netsites.js | 2 +- public/assets/netkits.js | 13 +++++++------ public/my.html | 2 +- server.js | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/netsites.js b/netsites.js index d4264d4..400d890 100644 --- a/netsites.js +++ b/netsites.js @@ -36,7 +36,7 @@ function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list; // entry also gets go = the LinkSpin network link for that site with ?src=, so a click shows in LinkSpin Reports under the // site that sent it (LinkSpin netlinks.js: fixed codes on the admin account). This site = NETWORK_SITE_ID, else the request host. // No go for this site itself, or when this site cannot be told (a test host): the page then uses the plain url. -const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', fivex: 'nw5x', downlinehydra: 'nwdh', stackpol: 'nwsp', earnerscorner: 'nwec' }; +const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', viraladsource: 'nwvas', fivex: 'nw5x', downlinehydra: 'nwdh', stackpol: 'nwsp', earnerscorner: 'nwec' }; const linksBase = () => String(process.env.NETWORK_LINKS_BASE || 'https://linkspin.app').trim().replace(/\/+$/, ''); const hostOf = u => { try { return new URL(u).hostname.toLowerCase().replace(/^www\./, ''); } catch (e) { return ''; } }; function selfId(req, l) { diff --git a/public/assets/netkits.js b/public/assets/netkits.js index 9e9406a..a9901ea 100644 --- a/public/assets/netkits.js +++ b/public/assets/netkits.js @@ -1,5 +1,5 @@ // Promo tools > Network sites (Marty 2026-11-14): the promo kits of the other network sites, read live from each site's own public -// feed (GET /api/promo-kit?u=), so a creative or line changed on any of those sites shows here (ViralAdBlitz, DownlineHydra and 5xYourTeam added 2026-11-15) +// feed (GET /api/promo-kit?u=), so a creative or line changed on any of those sites shows here (ViralAdBlitz, DownlineHydra and 5xYourTeam added 2026-11-15, ViralAdSource 2026-11-17) // at once. Usernames are network-wide: the member's InstantAdPay username is their sponsor link on those sites even if they never // visited them. Nothing is stored here. window.IAPNetKits = (function () { @@ -7,6 +7,7 @@ window.IAPNetKits = (function () { { key: 'dlb', name: 'Downline Banners', feed: 'https://downlinebanners.com/api/promo-kit', blurb: 'One global line of $5 banner spots on Polygon. A spot buys 300 guaranteed views on the board and a place in the line; every sale is split on-chain in the same transaction. Nothing is promised: a spot is paid only when spots sell after it.' }, { key: 'vbb', name: 'Viral Banner Blitz', feed: 'https://viralbannerblitz.com/api/promo-kit', blurb: 'One shared loop of 125x125 banners. Network members post free once a day, real visitors push the loop, and a banner that rides out earns network ad views. Weekly leaderboards for visitors sent. Advertising, not income.' }, { key: 'vab', name: 'ViralAdBlitz', feed: 'https://viraladblitz.com/api/promo-kit', blurb: 'Your free text ad shows on your whole team\'s pages, five levels deep. A $5 Boost adds 500 views; every Boost is split on-chain in the same transaction. Nothing is promised.' }, + { key: 'vas', name: 'ViralAdSource', feed: 'https://viraladsource.com/api/promo-kit', blurb: 'Post a free text ad that anyone can reshare with their own link, and watch its family tree grow branch by branch. A $5 Boost puts an ad on top of the reshare board for 7 days; every Boost is split on-chain in the same transaction. Nothing is promised.' }, { key: 'dh', name: 'DownlineHydra', feed: 'https://downlinehydra.com/api/promo-kit', blurb: 'One join, many heads: one free account and one sponsor line across the network, plus the downline builder for the programs you promote. Pro is $30 one time, never a subscription, split on-chain. Nothing is promised.' }, { key: 'fivex', name: '5xYourTeam', feed: 'https://5xyourteam.com/api/promo-kit', blurb: 'The weekly draft for people who need a sponsor. A $10 position lets you draft people waiting in the holding tank and coach them. Nothing is promised.' } ]; @@ -34,21 +35,21 @@ window.IAPNetKits = (function () { let h = '

' + esc(site.blurb) + '

'; // tracked links (2026-11-14): the site's LinkSpin network link, credited here to InstantAdPay as the site that sent the visit const strip = (label, url, cls) => '
' + esc(label) + '
' + esc(url) + '
' + cb(url, 'Copy link', cls) + '
'; - const fromHere = u => String(u).replace(/([?&]src=)[a-z0-9]+/i, '$1iap'); + const fromHere = u => String(u).replace(/([?&]src=)[a-z0-9]+/gi, '$1iap'); // also inside copy and HTML that already carry a tracked link (ViralAdSource 2026-11-17) h += k.links.map(l => strip(l.label, l.url, '') + (l.tracked ? strip(l.label + ', tracked', fromHere(l.tracked), 'sec') : '')).join(''); if (k.links.some(l => l.tracked)) h += '

A tracked link goes through LinkSpin first, so the network can see the visit came from InstantAdPay, then opens the same page with your username. Use either one.

'; h += '

Creatives

every HTML snippet already links to you
'; angles.forEach(a => { h += '
' + esc(a.angleLabel) + ' ' + by[a.angle].length + ' sizes
' + by[a.angle].map(c => '
' + esc(k.name + ', ' + c.label) + '' - + '
' + esc(c.label) + ' ' + c.w + '×' + c.h + '
Download ' + cb(c.url, 'Copy URL') + ' ' + cb(c.html, 'Copy HTML') + '
').join('') + + '
' + esc(c.label) + ' ' + c.w + '×' + c.h + '
Download ' + cb(c.url, 'Copy URL') + ' ' + cb(fromHere(c.html), 'Copy HTML') + '
').join('') + '
'; }); h += '

Short lines

chats, comments, text ads, signatures
' - + k.lines.map(t => '
' + esc(t) + '
' + cb(t) + '
').join(''); + + k.lines.map(fromHere).map(t => '
' + esc(t) + '
' + cb(t) + '
').join(''); h += '

Headlines

' + k.headlines.map(t => '
' + esc(t) + '
' + cb(t) + '
').join(''); - h += '

Email

plain text, paste it into any mailer
Subject: ' + esc(k.email.subject) + '
' + esc(k.email.body) + '
' + cb(k.email.subject, 'Copy subject') + ' ' + cb(k.email.body, 'Copy email', '') + '
'; - h += '

Social posts

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

Email

plain text, paste it into any mailer
Subject: ' + esc(k.email.subject) + '
' + esc(fromHere(k.email.body)) + '
' + cb(k.email.subject, 'Copy subject') + ' ' + cb(fromHere(k.email.body), 'Copy email', '') + '
'; + h += '

Social posts

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

' + esc(k.note) + '

'; if (k.promotePage) h += '

The same kit is on ' + esc(k.name) + ' › Promote.

'; return h; diff --git a/public/my.html b/public/my.html index 60b707f..c37e9ca 100644 --- a/public/my.html +++ b/public/my.html @@ -1311,7 +1311,7 @@ - + diff --git a/server.js b/server.js index fef95ed..6539f92 100644 --- a/server.js +++ b/server.js @@ -980,7 +980,7 @@ const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': ' '.png': 'image/png', '.jpg': 'image/jpeg', '.svg': 'image/svg+xml', '.webp': 'image/webp', '.ico': 'image/x-icon', '.json': 'application/json', '.mp4': 'video/mp4', '.woff2': 'font/woff2', '.gif': 'image/gif', '.webm': 'video/webm', '.vtt': 'text/vtt; charset=utf-8', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml; charset=utf-8' }; -const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://www.networkadspace.com https://networkadspace.com https://polhunter.com 'sha256-NzvNrqk5jB9YZATwo5BF4JoRlJ02HsnFikbKXgEPdaQ=' " + themehead.CSP_HASH + "; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' https: blob:; connect-src 'self' https://polhunter.com 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 https://linkspin.app https://downlinebanners.com https://viralbannerblitz.com https://viraladblitz.com https://downlinehydra.com https://5xyourteam.com; font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: http:"; +const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://www.networkadspace.com https://networkadspace.com https://polhunter.com 'sha256-NzvNrqk5jB9YZATwo5BF4JoRlJ02HsnFikbKXgEPdaQ=' " + themehead.CSP_HASH + "; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' https: blob:; connect-src 'self' https://polhunter.com 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 https://linkspin.app https://downlinebanners.com https://viralbannerblitz.com https://viraladblitz.com https://viraladsource.com https://downlinehydra.com https://5xyourteam.com; font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: http:"; function baseHeaders(extra) { return Object.assign({ 'Content-Security-Policy': CSP, 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin' }, extra || {});