Footer network links carry a referral username (Marty 2026-11-15): the signed-in member's own (/api/me), else the referral the visitor came in on (?ref= on the page, remembered for the visit, then the iap.sponsor join cookie; usernames only, never a member number or wallet). Tracked links get it as s1 (LinkSpin sends it on as ?ref=), plain links as ?ref=, none for Earners Corner. Same approach as VBB 6798503. common.js + netline.js ?v=20261115nr. NOT deployed (another lane owns the LinkSpin deploy).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 07:59:33 -06:00
parent 6607e39e30
commit 86007f0784
27 changed files with 73 additions and 38 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ function head(o) {
+ '</head><body><div class="wrap bl">';
}
function tail() {
return '</div><script src="/assets/common.js?v=20261114ns"></script><script src="/assets/blog-page.js?v=20260914a"></script></body></html>';
return '</div><script src="/assets/common.js?v=20261115nr"></script><script src="/assets/blog-page.js?v=20260914a"></script></body></html>';
}
const authorBox = () => '<div class="author"><img src="/logo-icon.png" alt="LinkSpin"><div><b>' + AUTHOR + '</b><span>Founder of LinkSpin and the Crypto Team Build Network. Twenty-plus years of internet marketing, and a habit of writing down what actually worked.</span></div></div>';
const cardHtml = p => '<a class="post-card" href="/blog/' + esc(p.slug) + '">' + (p.cover ? '<img src="' + esc(p.cover) + '" alt="" loading="lazy" style="width:100%;border-radius:10px;margin:0 0 12px">' : '') + '<h2>' + esc(p.title) + '</h2><p>' + esc(p.excerpt) + '</p><p class="meta">' + fmtDate(p.publishedAt || p.created) + ' · ' + readMinutes(p.body) + ' min read' + (p.tags.length ? ' · ' + p.tags.map(esc).join(', ') : '') + '</p></a>';
+1 -1
View File
@@ -146,7 +146,7 @@ async function renderPage() {
const w = winners();
if (w.length) h += '<h2 style="font-size:24px;margin:0 0 10px">Past winners</h2>' + w.slice(0, 12).map(x => '<div class="win"><b>' + (x.kind === 'week' ? 'Week of ' : 'Month of ') + fmtD(x.start) + '</b>: ' + (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) : '')) + '</div>').join('');
h += '<p class="muted small" style="margin-top:30px">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.</p>';
h += '</div><script src="/assets/common.js?v=20261114ns"></script><script src="/assets/blog-page.js?v=20260914a"></script></body></html>';
h += '</div><script src="/assets/common.js?v=20261115nr"></script><script src="/assets/blog-page.js?v=20260914a"></script></body></html>';
return h;
}
function setLaunchPanel(fn) { if (R) R.launchPanel = fn; }
+1 -1
View File
@@ -548,7 +548,7 @@
</div>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/admin-kb.js?v=20261020kb"></script>
<script src="/assets/admin.js?v=20261112txt"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-refill.js?v=20261024rf"></script><script src="/assets/admin-kits.js?v=20261024kit"></script><script src="/assets/admin-launchweek.js?v=20261105lw"></script>
</body>
+24 -4
View File
@@ -70,19 +70,39 @@ window.IAP = (function () {
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;
}
// the footer links carry a referral username (Marty 2026-11-15): the signed-in member's own, else the referral this visitor came in on
// (?ref= on this page, remembered for the visit, then the iap.sponsor join cookie; usernames only, never a member number or wallet).
// Tracked links get it as s1 (LinkSpin sends it on as ?ref=), plain links as ?ref=. Earners Corner takes none.
const okRef = v => /^[A-Za-z0-9_.-]{1,40}$/.test(v) && !/^\d+$/.test(v) && !/^0x[0-9a-f]{40}$/i.test(v) && v !== 'company' && v !== 'top';
const arrivedRef = () => {
try { const q = String(new URLSearchParams(location.search).get('ref') || '').trim().toLowerCase(); if (okRef(q)) { try { sessionStorage.setItem('ls.netref', q); } catch (e) {} return q; } } catch (e) {}
try { const v = sessionStorage.getItem('ls.netref') || ''; if (okRef(v)) return v; } catch (e) {}
const m = document.cookie.match(/(?:^|;\s*)iap\.sponsor=([^;]*)/); try { const v = m ? decodeURIComponent(m[1]) : ''; return okRef(v) ? v : ''; } catch (e) { return ''; }
};
let netRef = null;
function networkRef() {
if (!netRef) netRef = fetch('/api/me', { credentials: 'same-origin' }).then(r => r.json()).then(m => (m && m.signedIn && m.username && okRef(m.username) ? m.username : arrivedRef())).catch(() => arrivedRef());
return netRef;
}
function withRef(s, ref) {
const href = s.go || s.url; if (!ref || s.id === 'earnerscorner') return href;
try { const u = new URL(href); u.searchParams.set(s.go ? 's1' : 'ref', ref); return u.toString(); } catch (e) { return href; }
}
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 => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' })[ch]);
const paint = list => {
let list = NET_FALLBACK, ref = arrivedRef();
const paint = () => {
d.innerHTML = '<b>Part of the network</b><span>One account across the network:</span>' + list.map(s => (s.id === 'linkspin' || /linkspin\.app/.test(s.url))
? '<span aria-current="page" style="font-weight:700;color:var(--ink)">' + esc(s.name) + ' (you are here)</span>'
: '<a href="' + esc(s.go || s.url) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>').join('');
: '<a href="' + esc(withRef(s, ref)) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>').join('');
};
paint(NET_FALLBACK);
networkSites().then(paint);
paint();
networkSites().then(l => { list = l; paint(); });
networkRef().then(r => { if (r !== ref) { ref = r; 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); }); }
+19 -4
View File
@@ -4,6 +4,19 @@
var me = (document.currentScript && document.currentScript.getAttribute('data-site')) || 'linkspin';
var 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(function (a) { return { id: a[0], name: a[1], url: a[2] }; });
// the links carry a referral username (Marty 2026-11-15): the signed-in member's own, else the referral this visitor came in on
// (?ref= here, remembered for the visit, then the iap.sponsor cookie; usernames only). Tracked links get it as s1 (LinkSpin sends it
// on as ?ref=), plain links as ?ref=; Earners Corner none.
function okRef(v) { return /^[A-Za-z0-9_.-]{1,40}$/.test(v) && !/^\d+$/.test(v) && !/^0x[0-9a-f]{40}$/i.test(v) && v !== 'company' && v !== 'top'; }
function arrivedRef() {
try { var q = String(new URLSearchParams(location.search).get('ref') || '').trim().toLowerCase(); if (okRef(q)) { try { sessionStorage.setItem('ls.netref', q); } catch (e) {} return q; } } catch (e) {}
try { var v = sessionStorage.getItem('ls.netref') || ''; if (okRef(v)) return v; } catch (e) {}
var m = document.cookie.match(/(?:^|;\s*)iap\.sponsor=([^;]*)/); try { var c = m ? decodeURIComponent(m[1]) : ''; return okRef(c) ? c : ''; } catch (e) { return ''; }
}
function withRef(s, ref) {
var href = s.go || s.url; if (!ref || s.id === 'earnerscorner') return href;
try { var u = new URL(href); u.searchParams.set(s.go ? 's1' : 'ref', ref); return u.toString(); } catch (e) { return href; }
}
function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]; }); }
function run() {
var f = document.querySelector('footer'); if (!f || f.querySelector('.netline')) return;
@@ -11,13 +24,15 @@
var box = document.createElement('div'); box.className = 'netline';
box.style.cssText = 'flex-basis:100%;width:100%;margin-top:10px;display:flex;gap:6px 14px;flex-wrap:wrap;align-items:baseline;font-size:12.5px';
host.appendChild(box);
var paint = function (list) {
var list = FALLBACK, ref = arrivedRef();
var paint = function () {
box.innerHTML = '<span style="flex-basis:100%">TrustClickz · 615 Green Valley Drive, Moody, AL 35004</span><b>Part of the network</b><span>One account across the network:</span>' + list.map(function (s) {
return s.id === me ? '<span aria-current="page" style="font-weight:700">' + esc(s.name) + ' (you are here)</span>' : '<a href="' + esc(s.go || s.url) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>';
return s.id === me ? '<span aria-current="page" style="font-weight:700">' + esc(s.name) + ' (you are here)</span>' : '<a href="' + esc(withRef(s, ref)) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>';
}).join('');
};
paint(FALLBACK);
fetch('/api/network-sites').then(function (r) { return r.json(); }).then(function (l) { if (Array.isArray(l) && l.length) paint(l); }).catch(function () {});
paint();
fetch('/api/network-sites').then(function (r) { return r.json(); }).then(function (l) { if (Array.isArray(l) && l.length) { list = l; paint(); } }).catch(function () {});
fetch('/api/me', { credentials: 'same-origin' }).then(function (r) { return r.json(); }).then(function (m) { if (m && m.signedIn && m.username && okRef(m.username)) { ref = m.username; paint(); } }).catch(function () {});
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
})();
+1 -1
View File
@@ -149,6 +149,6 @@
</div>
</footer>
<script src="/assets/contract.js?v=20261023ov"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -284,6 +284,6 @@
</div>
</footer>
<script src="/assets/conversion-guide.js?v=20261024ct"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -81,7 +81,7 @@
</div>
</div>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/wallet.js?v=20261021a"></script>
<script src="/assets/cr-shell.js?v=20261114tu"></script>
<script src="/assets/credits-screen.js?v=20261107tg"></script>
+1 -1
View File
@@ -47,6 +47,6 @@
<span class="mono" style="font-size:11px">a Crypto Team Build Network property</span>
</div>
</footer>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+2 -2
View File
@@ -69,7 +69,7 @@
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -225,6 +225,6 @@
</footer>
<script src="/assets/home.js?v=20261113me"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+2 -2
View File
@@ -106,8 +106,8 @@ body.squeeze .card{position:sticky;top:16px}
<span class="mono" style="font-size:11px">a Crypto Team Build Network property</span>
</div>
</footer>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/join.js?v=20261111b4h"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -102,7 +102,7 @@
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/launch.js?v=20261105po"></script>
</body>
</html>
+2 -2
View File
@@ -65,8 +65,8 @@
<span class="mono" style="font-size:11px">a Crypto Team Build Network property</span>
</div>
</footer>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/ledger.js?v=20261007a"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -1015,7 +1015,7 @@
</div>
</div>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/cr-shell.js?v=20261114tu"></script>
<script src="/assets/tools.js?v=20261011a"></script>
<script src="/assets/wallet.js?v=20261021a"></script>
+2 -2
View File
@@ -131,8 +131,8 @@
<div class="small">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.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/partners.js?v=20261010a"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -193,7 +193,7 @@
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/plays.js?v=20260910b"></script>
</body>
</html>
+1 -1
View File
@@ -56,6 +56,6 @@
<span class="mono" style="font-size:11px">a Crypto Team Build Network property</span>
</div>
</footer>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -289,6 +289,6 @@
</footer>
<script src="/assets/publishers.js?v=20261010a"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -281,6 +281,6 @@
</div>
</footer>
<script src="/assets/refuel-guide.js?v=20261024rg"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+2 -2
View File
@@ -67,8 +67,8 @@
<span class="mono" style="font-size:11px">a Crypto Team Build Network property</span>
</div>
</footer>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/support.js?v=20261016a"></script>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -62,6 +62,6 @@
<span class="mono" style="font-size:11px">a Crypto Team Build Network property</span>
</div>
</footer>
<script src="/assets/netline.js?v=20261114ns" data-site="linkspin"></script>
<script src="/assets/netline.js?v=20261115nr" data-site="linkspin"></script>
</body>
</html>
+1 -1
View File
@@ -35,7 +35,7 @@
<p><a href="/ledger">← Back to the live ledger</a> · <a href="/contract">Read the contract review</a></p>
</div>
</section>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/tx.js?v=20260906m"></script>
</body>
</html>
+1 -1
View File
@@ -49,7 +49,7 @@
</div>
</div>
</section>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/wall.js?v=20261030pp"></script>
<script src="/assets/wall-founder.js?v=20261105fd"></script>
</body>
+1 -1
View File
@@ -120,7 +120,7 @@
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never share your recovery phrase.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261114ns"></script>
<script src="/assets/common.js?v=20261115nr"></script>
<script src="/assets/wallets.js?v=20261026a"></script>
</body>
</html>
+1 -1
View File
@@ -66,7 +66,7 @@ function renderPage() {
h += '<h2 style="font-size:24px;margin:10px 0 16px">Release notes</h2>';
h += v.notes.length ? v.notes.map(n => '<article class="note" id="' + esc(n.id) + '"><h2>' + esc(n.title) + n.tags.map(tagChip).join('') + '</h2><p class="when">' + fmt(n.date) + '</p>' + bodyHtml(n.body) + '</article>').join('') : '<p class="muted">No notes yet.</p>';
h += '<p class="muted small" style="margin-top:30px">Suggestions and bug reports: the chat bubble on any page, or the LinkSpin Telegram group.</p>';
h += '</div><script src="/assets/common.js?v=20261114ns"></script><script src="/assets/blog-page.js?v=20260914a"></script></body></html>';
h += '</div><script src="/assets/common.js?v=20261115nr"></script><script src="/assets/blog-page.js?v=20260914a"></script></body></html>';
return h;
}
module.exports = { init, notes, roadmap, saveNote, saveRoadmap, remove, publicView, renderPage, bodyHtml, TAGS, STATUSES };
+1 -1
View File
@@ -4498,7 +4498,7 @@ const server = http.createServer(async (req, res) => {
+ '<style>.bp{max-width:560px;text-align:center;padding:40px 16px 60px}.bp img{width:100%;max-width:520px;border-radius:18px;border:1px solid var(--line);box-shadow:0 20px 60px rgba(0,0,0,.45)}.bp h1{font-size:clamp(24px,5vw,34px);margin:22px 0 8px}.bp p{color:var(--muted);max-width:44ch;margin:0 auto 20px}</style></head>'
+ '<body><div class="wrap bp"><img src="' + img + '" alt="' + esc(label) + ' badge for @' + esc(un) + '"><h1>@' + esc(un) + ' unlocked <em>' + label + '</em></h1><p>' + 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.</p>'
+ '<a class="btn" href="/join/' + esc(un) + '">Join @' + esc(un) + '\u2019s line free</a><p class="small" style="margin-top:26px">Advertising with a performance referral program. Not an investment; no income is guaranteed.</p></div>'
+ '<script src="/assets/common.js?v=20261114ns"></script><script src="/assets/blog-page.js?v=20260912a"></script></body></html>';
+ '<script src="/assets/common.js?v=20261115nr"></script><script src="/assets/blog-page.js?v=20260912a"></script></body></html>';
res.writeHead(200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'public, max-age=300' }));
return res.end(html);
}