From 6798503c1feeb4b54d4739331fc0843a8cc50458 Mon Sep 17 00:00:00 2001 From: martbost Date: Sun, 15 Nov 2026 07:54:20 -0600 Subject: [PATCH] Footer network links carry a referral username (Marty 2026-11-15): the signed-in member's own, else the ?ref= the visitor came in on; tracked links as s1, plain links as ?ref=, none for Earners Corner. common.js?v=8 Co-Authored-By: Claude Opus 5.5 --- public/admin.html | 2 +- public/assets/common.js | 18 ++++++++++++++---- public/contract.html | 2 +- public/disclaimer.html | 2 +- public/how.html | 2 +- public/index.html | 2 +- public/leaders.html | 2 +- public/ledger.html | 2 +- public/my.html | 2 +- public/packages.html | 2 +- public/privacy.html | 2 +- public/promote.html | 2 +- public/terms.html | 2 +- 13 files changed, 26 insertions(+), 16 deletions(-) diff --git a/public/admin.html b/public/admin.html index 322704c..98d0586 100644 --- a/public/admin.html +++ b/public/admin.html @@ -36,7 +36,7 @@ - + diff --git a/public/assets/common.js b/public/assets/common.js index 61bfb4d..b1b8fa9 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -58,12 +58,22 @@ window.VBB = (function () { // "Part of the network": the list comes from the hub through /api/network-sites, the built-in copy if it does not answer const NET = [['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] })); + // the footer links carry a referral username (Marty 2026-11-15): the signed-in member's own, else the ?ref= this visitor came in on + // (vbb.ref cookie, usernames only). Tracked links get it as s1 (LinkSpin sends it on as ?ref=), plain links as ?ref=. Earners Corner takes none. + const REF_RE = /^[A-Za-z0-9_.-]{1,40}$/; + const refCookie = () => { const m = document.cookie.match(/(?:^|;\s*)vbb\.ref=([^;]*)/); try { const v = m ? decodeURIComponent(m[1]) : ''; return REF_RE.test(v) && !/^0x[0-9a-f]{40}$/i.test(v) ? v : ''; } catch (e) { return ''; } }; + 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 netLine(el) { if (!el) return; - const paint = list => { el.innerHTML = 'Part of the network · One account across the network: ' + list.map(s => (s.id === 'vbb' || /viralbannerblitz\.com/.test(s.url)) - ? '' + esc(s.name) + '' : '' + esc(s.name) + '').join(' · '); }; - paint(NET); - fetch('/api/network-sites').then(r => r.json()).then(l => { if (Array.isArray(l) && l.length) paint(l); }).catch(() => {}); + let list = NET; let ref = refCookie(); + const paint = () => { el.innerHTML = 'Part of the network · One account across the network: ' + list.map(s => (s.id === 'vbb' || /viralbannerblitz\.com/.test(s.url)) + ? '' + esc(s.name) + '' : '' + esc(s.name) + '').join(' · '); }; + paint(); + fetch('/api/network-sites').then(r => r.json()).then(l => { if (Array.isArray(l) && l.length) { list = l; paint(); } }).catch(() => {}); + fetch('/api/me', { credentials: 'same-origin' }).then(r => r.json()).then(m => { if (m && m.signedIn && m.username && REF_RE.test(m.username)) { ref = m.username; paint(); } }).catch(() => {}); } // live toasts: real cycles, purchases and prize payouts only, bottom-left, one at a time, never older than 30 minutes let toastsOn = false; diff --git a/public/contract.html b/public/contract.html index 8e25f96..157a426 100644 --- a/public/contract.html +++ b/public/contract.html @@ -50,7 +50,7 @@ - + diff --git a/public/disclaimer.html b/public/disclaimer.html index 230360d..c76b204 100644 --- a/public/disclaimer.html +++ b/public/disclaimer.html @@ -34,7 +34,7 @@

Your decision

Only spend what you can afford to lose completely. This is not financial, legal or tax advice. You are responsible for any taxes on what you receive.

Contact

Questions, problems or a request about your data: network support, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.

- + diff --git a/public/how.html b/public/how.html index f0dee2f..de6b58e 100644 --- a/public/how.html +++ b/public/how.html @@ -55,7 +55,7 @@ - + diff --git a/public/index.html b/public/index.html index edecb73..4648dcc 100644 --- a/public/index.html +++ b/public/index.html @@ -56,7 +56,7 @@ - + diff --git a/public/leaders.html b/public/leaders.html index e7e02d2..a408710 100644 --- a/public/leaders.html +++ b/public/leaders.html @@ -33,7 +33,7 @@ - + diff --git a/public/ledger.html b/public/ledger.html index 7df26fa..e732b64 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -35,7 +35,7 @@ - + diff --git a/public/my.html b/public/my.html index eb804e5..9b0d1be 100644 --- a/public/my.html +++ b/public/my.html @@ -78,7 +78,7 @@ - + diff --git a/public/packages.html b/public/packages.html index 304f8bb..8f5f2e0 100644 --- a/public/packages.html +++ b/public/packages.html @@ -43,7 +43,7 @@

Every network member (InstantAdPay or LinkSpin) also gets one free post credit each day they sign in.

Use my free credit
- + diff --git a/public/privacy.html b/public/privacy.html index c16530c..fbee33b 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -35,7 +35,7 @@

Your choices

You can ask us to delete your account data on this site or on the network hub. Records on the blockchain cannot be deleted by anyone. You can clear the cookies in your browser at any time; you will need to sign in again.

Contact

Questions, problems or a request about your data: network support, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.

- + diff --git a/public/promote.html b/public/promote.html index b8f18e8..0f9df04 100644 --- a/public/promote.html +++ b/public/promote.html @@ -34,7 +34,7 @@

Loading the kit...

- + diff --git a/public/terms.html b/public/terms.html index e639ae6..19d5461 100644 --- a/public/terms.html +++ b/public/terms.html @@ -40,7 +40,7 @@

Limits

As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites in banners, or events outside our control, and our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.

Contact

Questions, problems or a request about your data: network support, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.

- +