From f1f757f895f7f1392f3187325c0de0a046adee69 Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 14 Nov 2026 10:22:33 -0600 Subject: [PATCH] Footer: 'Part of the network' line from the network hub (Marty 2026-11-14 trust pack), smallest change before the 11-15 launch. netsites.js serves GET /api/network-sites (hub GET /v1/network-sites, 10 min cache, never waits on a slow hub, built-in fallback); common.js paints the line (LinkSpin marked as current) in the site footer and the members-area footer; company line TrustClickz, 615 Green Valley Drive, Moody, AL 35004; Earnings Disclaimer label; members-area footer links Support, Terms, Earnings Disclaimer, Privacy. common.js?v=20261114nf. qa member: 57 passed, 0 failed Co-Authored-By: Claude Opus 5.5 --- blog.js | 2 +- leaderboard.js | 2 +- netsites.js | 40 ++++++++++++++++++++++++++++++++++++++++ public/admin.html | 2 +- public/assets/common.js | 29 ++++++++++++++++++++++++++++- public/credits.html | 2 +- public/earning.html | 2 +- public/join.html | 2 +- public/launch.html | 2 +- public/ledger.html | 2 +- public/my.html | 4 ++-- public/partners.html | 2 +- public/plays.html | 2 +- public/support.html | 2 +- public/tx.html | 2 +- public/wall.html | 2 +- public/wallets.html | 2 +- releases.js | 2 +- server.js | 4 +++- 19 files changed, 88 insertions(+), 19 deletions(-) create mode 100644 netsites.js diff --git a/blog.js b/blog.js index ed6749c..40ce3a1 100644 --- a/blog.js +++ b/blog.js @@ -110,7 +110,7 @@ function head(o) { + '
'; } function tail() { - return '
'; + return ''; } const authorBox = () => '
LinkSpin
' + AUTHOR + 'Founder of LinkSpin and the Crypto Team Build Network. Twenty-plus years of internet marketing, and a habit of writing down what actually worked.
'; const cardHtml = p => '' + (p.cover ? '' : '') + '

' + esc(p.title) + '

' + esc(p.excerpt) + '

' + fmtDate(p.publishedAt || p.created) + ' · ' + readMinutes(p.body) + ' min read' + (p.tags.length ? ' · ' + p.tags.map(esc).join(', ') : '') + '

'; diff --git a/leaderboard.js b/leaderboard.js index 66e9e00..0ba05b7 100644 --- a/leaderboard.js +++ b/leaderboard.js @@ -146,7 +146,7 @@ async function renderPage() { const w = winners(); if (w.length) h += '

Past winners

' + w.slice(0, 12).map(x => '
' + (x.kind === 'week' ? 'Week of ' : 'Month of ') + fmtD(x.start) + ': ' + (x.top[0] ? esc(x.top[0].name) + ' (' + x.top[0].sales + ' sold, $' + x.top[0].usd + ')' : 'no sales') + (x.granted && x.granted.length ? ' · awarded: ' + x.granted.map(g => esc(g.name) + ' +' + g.credits.toLocaleString()).join(', ') : (x.prize ? ' · prize ' + esc(x.prize) : '')) + '
').join(''); h += '

Sales are $ of packages bought by members you directly sponsor. Weekly and monthly prizes are advertising credits or packages, never cash. No income is guaranteed.

'; - h += ''; + h += ''; return h; } function setLaunchPanel(fn) { if (R) R.launchPanel = fn; } diff --git a/netsites.js b/netsites.js new file mode 100644 index 0000000..2536f92 --- /dev/null +++ b/netsites.js @@ -0,0 +1,40 @@ +// The network sites list for the footer's "Part of the network" line (Marty 2026-11-14 trust pack). +// One source: the hub's public GET /v1/network-sites (HUB_URL). Cached 10 minutes, refreshed in the background, never waits on a +// slow hub (2.5 s timeout), and falls back to the same built-in list. Never RM Circle, never the games. +// The same file lives in every network site (InstantAdPay, LinkSpin, Downline Banners, VBB, Stack POL). +const FALLBACK = [ + { id: 'iap', name: 'InstantAdPay', url: 'https://instantadpay.com' }, + { id: 'linkspin', name: 'LinkSpin', url: 'https://linkspin.app' }, + { id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' }, + { id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' }, + { id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' }, + { id: 'earnerscorner', name: 'Earners Corner', url: 'https://earnerscorner.com' } +]; +const TTL = 10 * 60 * 1000; +let cache = { at: 0, list: FALLBACK, from: 'fallback' }; +let inflight = null; + +const hubUrl = () => String(process.env.HUB_URL || 'https://hub.saasy.top').trim().replace(/\/+$/, ''); +function clean(list) { + if (!Array.isArray(list)) return null; + const ok = list.filter(s => s && typeof s.name === 'string' && /^https:\/\/[a-z0-9.-]+(\/[^\s"'<>]*)?$/i.test(String(s.url || ''))) + .slice(0, 30).map(s => ({ id: String(s.id || s.name).toLowerCase().replace(/[^a-z0-9]+/g, '').slice(0, 30), name: String(s.name).slice(0, 60), url: String(s.url).replace(/\/+$/, '') })); + return ok.length ? ok : null; +} +function refresh() { + if (inflight || process.env.NETWORK_SITES_HUB === '0') return inflight; + const ac = new AbortController(); const t = setTimeout(() => ac.abort(), 2500); + inflight = fetch(hubUrl() + '/v1/network-sites', { signal: ac.signal }) + .then(r => (r.ok ? r.json() : null)) + .then(j => { const l = clean(j); if (l) cache = { at: Date.now(), list: l, from: 'hub' }; else cache.at = Date.now(); }) + .catch(() => { cache.at = Date.now() - TTL + 60 * 1000; }) // hub down: try again in a minute, keep the last good list + .finally(() => { clearTimeout(t); inflight = null; }); + return inflight; +} +function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list; } +// GET /api/network-sites: public, cacheable, the same answer on every page +function handle(req, res) { + res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'public, max-age=300', 'X-Content-Type-Options': 'nosniff' }); + res.end(JSON.stringify(list())); +} +module.exports = { list, handle, refresh, FALLBACK, _state: () => cache }; diff --git a/public/admin.html b/public/admin.html index 791177a..1919448 100644 --- a/public/admin.html +++ b/public/admin.html @@ -548,7 +548,7 @@ - + diff --git a/public/assets/common.js b/public/assets/common.js index 275d2c2..c7f9d1e 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -57,9 +57,36 @@ window.IAP = (function () { f.innerHTML = '
© ' + new Date().getFullYear() + ' LinkSpin
' + '
' + 'How it worksLive ledgerThe contractBlogLeaderboardWhat\'s newSupport' - + 'TermsPrivacyDisclaimer
'; + + 'TermsEarnings DisclaimerPrivacy' + + '
TrustClickz · 615 Green Valley Drive, Moody, AL 35004
'; document.body.appendChild(f); + renderNetworkLine(f); } + // "Part of the network" (Marty 2026-11-14 trust pack): the list comes from the hub through /api/network-sites, built-in copy if not + const NET_FALLBACK = [['iap', 'InstantAdPay', 'https://instantadpay.com'], ['linkspin', 'LinkSpin', 'https://linkspin.app'], ['dlb', 'Downline Banners', 'https://downlinebanners.com'], + ['vbb', 'Viral Banner Blitz', 'https://viralbannerblitz.com'], ['stackpol', 'Stack POL', 'https://stackpol.com'], ['earnerscorner', 'Earners Corner', 'https://earnerscorner.com']].map(a => ({ id: a[0], name: a[1], url: a[2] })); + let netList = null; + function networkSites() { + if (!netList) netList = fetch('/api/network-sites').then(r => r.json()).then(l => (Array.isArray(l) && l.length ? l : NET_FALLBACK)).catch(() => NET_FALLBACK); + return netList; + } + function renderNetworkLine(host) { + if (!host || host.querySelector('.netline')) return; + const d = document.createElement('div'); d.className = 'netline'; + d.style.cssText = 'margin-top:10px;display:flex;gap:6px 14px;justify-content:center;flex-wrap:wrap;align-items:baseline;font-size:12.5px'; + host.appendChild(d); + const esc = s => String(s).replace(/[&<>"]/g, ch => ({ '&': '&', '<': '<', '>': '>', '"': '"' })[ch]); + const paint = list => { + d.innerHTML = 'Part of the networkOne account across the network:' + list.map(s => (s.id === 'linkspin' || /linkspin\.app/.test(s.url)) + ? '' + esc(s.name) + ' (you are here)' + : '' + esc(s.name) + '').join(''); + }; + paint(NET_FALLBACK); + networkSites().then(paint); + } + // pages with their own footer (the members area) get the network line too + function decorateFooters() { document.querySelectorAll('footer.bo-pagefoot').forEach(f => { const w = document.createElement('div'); w.style.width = '100%'; f.appendChild(w); renderNetworkLine(w); }); } + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', decorateFooters); else decorateFooters(); async function refreshNavWallet() { try { const me = await (await fetch('/api/me')).json(); diff --git a/public/credits.html b/public/credits.html index abb75a5..5b4a6be 100644 --- a/public/credits.html +++ b/public/credits.html @@ -81,7 +81,7 @@ - + diff --git a/public/earning.html b/public/earning.html index b3d071c..d31bf57 100644 --- a/public/earning.html +++ b/public/earning.html @@ -69,6 +69,6 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees.
- + diff --git a/public/join.html b/public/join.html index 820d15f..d8ca23c 100644 --- a/public/join.html +++ b/public/join.html @@ -106,7 +106,7 @@ body.squeeze .card{position:sticky;top:16px} a Crypto Team Build Network property - + diff --git a/public/launch.html b/public/launch.html index 5168070..b764218 100644 --- a/public/launch.html +++ b/public/launch.html @@ -102,7 +102,7 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees.
- + diff --git a/public/ledger.html b/public/ledger.html index d2af91e..1399709 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -65,7 +65,7 @@ a Crypto Team Build Network property - + diff --git a/public/my.html b/public/my.html index bcd25da..4ac4dae 100644 --- a/public/my.html +++ b/public/my.html @@ -990,7 +990,7 @@ - + @@ -1015,7 +1015,7 @@ - + diff --git a/public/partners.html b/public/partners.html index 0c0bf2e..75c4535 100644 --- a/public/partners.html +++ b/public/partners.html @@ -131,7 +131,7 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford to lose.
- + diff --git a/public/plays.html b/public/plays.html index df577a3..b95bbbc 100644 --- a/public/plays.html +++ b/public/plays.html @@ -193,7 +193,7 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.
- + diff --git a/public/support.html b/public/support.html index 0256f2e..7fb925c 100644 --- a/public/support.html +++ b/public/support.html @@ -67,7 +67,7 @@ a Crypto Team Build Network property - + diff --git a/public/tx.html b/public/tx.html index 63a5e84..0af37dc 100644 --- a/public/tx.html +++ b/public/tx.html @@ -35,7 +35,7 @@

← Back to the live ledger · Read the contract review

- + diff --git a/public/wall.html b/public/wall.html index fdb3fe6..1a882ab 100644 --- a/public/wall.html +++ b/public/wall.html @@ -49,7 +49,7 @@ - + diff --git a/public/wallets.html b/public/wallets.html index 800c3cd..3e20fec 100644 --- a/public/wallets.html +++ b/public/wallets.html @@ -120,7 +120,7 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never share your recovery phrase.
- + diff --git a/releases.js b/releases.js index fae6ba8..52aba4d 100644 --- a/releases.js +++ b/releases.js @@ -66,7 +66,7 @@ function renderPage() { h += '

Release notes

'; h += v.notes.length ? v.notes.map(n => '

' + esc(n.title) + n.tags.map(tagChip).join('') + '

' + fmt(n.date) + '

' + bodyHtml(n.body) + '
').join('') : '

No notes yet.

'; h += '

Suggestions and bug reports: the chat bubble on any page, or the LinkSpin Telegram group.

'; - h += ''; + h += ''; return h; } module.exports = { init, notes, roadmap, saveNote, saveRoadmap, remove, publicView, renderPage, bodyHtml, TAGS, STATUSES }; diff --git a/server.js b/server.js index b345c0e..a5e33c4 100644 --- a/server.js +++ b/server.js @@ -10,6 +10,7 @@ const dns = require('dns'); const fs = require('fs'); const path = require('path'); const crypto = require('crypto'); +const netsites = require('./netsites'); // footer network list from the hub (2026-11-14 trust pack) const sendy = require('./sendy'); const { URL } = require('url'); const chain = require('./chain'); @@ -1652,6 +1653,7 @@ const server = http.createServer(async (req, res) => { } // -- public API + if (p === '/api/network-sites' && req.method === 'GET') return netsites.handle(req, res); if (p === '/api/config' && req.method === 'GET') { const c = chain.getConfig(); // public copy of the site settings: never anything that looks like a credential @@ -4425,7 +4427,7 @@ const server = http.createServer(async (req, res) => { + '' + '
' + esc(label) + ' badge for @' + esc(un) + '

@' + esc(un) + ' unlocked ' + label + '

' + esc(sub.charAt(0).toUpperCase() + sub.slice(1)) + '. On LinkSpin every ad package that sells pays the sponsor in the same transaction, straight to their wallet, on-chain.

' + 'Join @' + esc(un) + '\u2019s line free

Advertising with a performance referral program. Not an investment; no income is guaranteed.

' - + ''; + + ''; res.writeHead(200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'public, max-age=300' })); return res.end(html); }