From c79b0aedf67db19d7097aaa39c1800da5acdb676 Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 13 Nov 2026 05:28:15 -0600 Subject: [PATCH] Network links (Marty 2026-11-13 'yes please proceed'): every click on a link to the other site goes through /go/ (InstantAdPay -> /go/linkspin, LinkSpin -> /go/iap), so a signed-in member arrives signed in; signed out it is a plain redirect. Click-time rewrite in the shared scripts (IAP common.js; LinkSpin common.js + cr-shell.js), so copied share links stay clean; data-nogo opts a link out. Browser check: path+query+hash kept, other hosts and data-nogo untouched. iap-qa member ALL PASSED. common.js/cr-shell.js ?v=20261113nl Co-Authored-By: Claude Opus 5.5 --- blog.js | 2 +- leaderboard.js | 2 +- public/admin.html | 2 +- public/ads.html | 2 +- public/assets/common.js | 15 +++++++++++++++ public/assets/cr-shell.js | 15 +++++++++++++++ public/conversions.html | 2 +- public/credits.html | 4 ++-- public/earning.html | 2 +- public/help.html | 2 +- public/join.html | 2 +- public/launch.html | 2 +- public/ledger.html | 2 +- public/links.html | 2 +- public/my.html | 4 ++-- public/pages.html | 2 +- public/partners.html | 2 +- public/plays.html | 2 +- public/reports.html | 2 +- public/sources.html | 2 +- public/support.html | 2 +- public/team.html | 2 +- public/traffic-guide.html | 2 +- public/tx.html | 2 +- public/wall.html | 2 +- public/wallet.html | 2 +- public/wallets.html | 2 +- public/zones.html | 2 +- releases.js | 2 +- server.js | 2 +- 30 files changed, 60 insertions(+), 30 deletions(-) diff --git a/blog.js b/blog.js index 87e84b7..ed6749c 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 11c4c14..66e9e00 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/public/admin.html b/public/admin.html index 1dd5fbd..791177a 100644 --- a/public/admin.html +++ b/public/admin.html @@ -548,7 +548,7 @@ - + diff --git a/public/ads.html b/public/ads.html index e73efd3..5bc9065 100644 --- a/public/ads.html +++ b/public/ads.html @@ -75,7 +75,7 @@ - + diff --git a/public/assets/common.js b/public/assets/common.js index 694588a..275d2c2 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -251,3 +251,18 @@ window.IAP = (function () { return { getConfig, fmtPol, fmtUsd, status, renderNav, refreshNavWallet, describeEvent, feedRow, adSlot, reportAd, requestCode, launchChecks, launchToggle, ask, confirmBox, $, guard: { FORM_TS, iconCheck, hpValue, formSettled } }; // guard: the sign-up walls, reused by /support and the chat hand-off })(); + +// Network links (2026-11-13): a click on a link to InstantAdPay goes through /go/iap, which signs a signed-in member in over there and is a +// plain redirect for everyone else. Rewritten at click time only, so links people copy to share stay clean. data-nogo opts a link out. +(function () { + if (window.__netlinks) return; window.__netlinks = 1; + const HOSTS = ['instantadpay.com', 'www.instantadpay.com']; + document.addEventListener('click', e => { + if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return; + const a = e.target && e.target.closest ? e.target.closest('a[href]') : null; + if (!a || a.hasAttribute('download') || a.hasAttribute('data-nogo')) return; + let u; try { u = new URL(a.href); } catch (x) { return; } + if (u.protocol !== 'https:' || !HOSTS.includes(u.hostname)) return; + a.href = '/go/iap?to=' + encodeURIComponent(u.pathname + u.search + u.hash); + }, true); +})(); diff --git a/public/assets/cr-shell.js b/public/assets/cr-shell.js index ef7f58e..4545b83 100644 --- a/public/assets/cr-shell.js +++ b/public/assets/cr-shell.js @@ -293,3 +293,18 @@ window.CR = (function () { } return { esc, fmt, api, get, copy, dialog, toast, mount, sub, me, requireSession, signInFlow, tile, sparkline, delta, helpBadge, tankItem }; })(); + +// Network links (2026-11-13): a click on a link to InstantAdPay goes through /go/iap, which signs a signed-in member in over there and is a +// plain redirect for everyone else. Rewritten at click time only, so links people copy to share stay clean. data-nogo opts a link out. +(function () { + if (window.__netlinks) return; window.__netlinks = 1; + const HOSTS = ['instantadpay.com', 'www.instantadpay.com']; + document.addEventListener('click', e => { + if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return; + const a = e.target && e.target.closest ? e.target.closest('a[href]') : null; + if (!a || a.hasAttribute('download') || a.hasAttribute('data-nogo')) return; + let u; try { u = new URL(a.href); } catch (x) { return; } + if (u.protocol !== 'https:' || !HOSTS.includes(u.hostname)) return; + a.href = '/go/iap?to=' + encodeURIComponent(u.pathname + u.search + u.hash); + }, true); +})(); diff --git a/public/conversions.html b/public/conversions.html index 6700534..4bc3cd3 100644 --- a/public/conversions.html +++ b/public/conversions.html @@ -70,7 +70,7 @@
- + diff --git a/public/credits.html b/public/credits.html index 7e0c68d..abb75a5 100644 --- a/public/credits.html +++ b/public/credits.html @@ -81,9 +81,9 @@ - + - + diff --git a/public/earning.html b/public/earning.html index 8954adb..b3d071c 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/help.html b/public/help.html index ee5b76f..3b731ab 100644 --- a/public/help.html +++ b/public/help.html @@ -30,7 +30,7 @@
loading
- + diff --git a/public/join.html b/public/join.html index 422ae4c..820d15f 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 3b32564..5168070 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 f7d0776..d2af91e 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -65,7 +65,7 @@ a Crypto Team Build Network property - + diff --git a/public/links.html b/public/links.html index 46a602e..2e7bd42 100644 --- a/public/links.html +++ b/public/links.html @@ -270,7 +270,7 @@ - + diff --git a/public/my.html b/public/my.html index 6b483c2..bcd25da 100644 --- a/public/my.html +++ b/public/my.html @@ -1015,8 +1015,8 @@ - - + + diff --git a/public/pages.html b/public/pages.html index 3362fc6..cd16dc9 100644 --- a/public/pages.html +++ b/public/pages.html @@ -73,7 +73,7 @@ - + diff --git a/public/partners.html b/public/partners.html index 3bd0a77..0c0bf2e 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 9479ff8..df577a3 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/reports.html b/public/reports.html index ba9dfdd..808273c 100644 --- a/public/reports.html +++ b/public/reports.html @@ -90,7 +90,7 @@ - + diff --git a/public/sources.html b/public/sources.html index a396fce..85af86b 100644 --- a/public/sources.html +++ b/public/sources.html @@ -128,7 +128,7 @@ - + diff --git a/public/support.html b/public/support.html index dbff747..0256f2e 100644 --- a/public/support.html +++ b/public/support.html @@ -67,7 +67,7 @@ a Crypto Team Build Network property - + diff --git a/public/team.html b/public/team.html index e56f880..71b4a4b 100644 --- a/public/team.html +++ b/public/team.html @@ -38,7 +38,7 @@ - + diff --git a/public/traffic-guide.html b/public/traffic-guide.html index cc12a36..168b829 100644 --- a/public/traffic-guide.html +++ b/public/traffic-guide.html @@ -64,7 +64,7 @@
- + diff --git a/public/tx.html b/public/tx.html index 6c917cc..63a5e84 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 3573fbe..fdb3fe6 100644 --- a/public/wall.html +++ b/public/wall.html @@ -49,7 +49,7 @@ - + diff --git a/public/wallet.html b/public/wallet.html index 32da034..fb160be 100644 --- a/public/wallet.html +++ b/public/wallet.html @@ -36,7 +36,7 @@ - + diff --git a/public/wallets.html b/public/wallets.html index e0ea3bc..800c3cd 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/public/zones.html b/public/zones.html index 0abbae2..54122bf 100644 --- a/public/zones.html +++ b/public/zones.html @@ -42,7 +42,7 @@ - + diff --git a/releases.js b/releases.js index 80598d1..fae6ba8 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 00d2a65..4d18e14 100644 --- a/server.js +++ b/server.js @@ -4371,7 +4371,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); }