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 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 07:54:20 -06:00
parent 47cb360204
commit 6798503c1f
13 changed files with 26 additions and 16 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/admin.js?v=2"></script>
</body>
</html>
+14 -4
View File
@@ -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 = '<b>Part of the network</b> &middot; One account across the network: ' + list.map(s => (s.id === 'vbb' || /viralbannerblitz\.com/.test(s.url))
? '<span class="here" aria-current="page">' + esc(s.name) + '</span>' : '<a href="' + esc(s.go || s.url) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>').join(' &middot; '); };
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 = '<b>Part of the network</b> &middot; One account across the network: ' + list.map(s => (s.id === 'vbb' || /viralbannerblitz\.com/.test(s.url))
? '<span class="here" aria-current="page">' + esc(s.name) + '</span>' : '<a href="' + esc(withRef(s, ref)) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>').join(' &middot; '); };
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;
+1 -1
View File
@@ -50,7 +50,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/contract.js?v=1"></script>
</body>
</html>
+1 -1
View File
@@ -34,7 +34,7 @@
<div class="card"><h2>Your decision</h2><p>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.</p></div>
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/static.js?v=1"></script>
</body>
</html>
+1 -1
View File
@@ -55,7 +55,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/static.js?v=1"></script>
<script src="https://polhunter.com/embed.js" data-slots="4" data-selector="main.wrap > .card" async></script>
</body>
+1 -1
View File
@@ -56,7 +56,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/splash.js?v=3"></script>
</body>
</html>
+1 -1
View File
@@ -33,7 +33,7 @@
<div class="card" id="pastCard" hidden><h2>Past winners</h2><p class="muted small">Paid in POL from the prize wallet at the POL price at payout time. Every payment is a public Polygon transaction.</p><div class="past" id="past"></div></div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/leaders.js?v=3"></script>
</body>
</html>
+1 -1
View File
@@ -35,7 +35,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/ledger.js?v=1"></script>
</body>
</html>
+1 -1
View File
@@ -78,7 +78,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/wallet.js?v=2"></script>
<script src="/assets/buy.js?v=1"></script>
<script src="/assets/my.js?v=3"></script>
+1 -1
View File
@@ -43,7 +43,7 @@
<div class="card center"><p>Every network member (InstantAdPay or LinkSpin) also gets one free post credit each day they sign in.</p><a class="btn sec" href="/my">Use my free credit</a></div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/wallet.js?v=2"></script>
<script src="/assets/buy.js?v=1"></script>
<script src="/assets/packages.js?v=1"></script>
+1 -1
View File
@@ -35,7 +35,7 @@
<div class="card"><h2>Your choices</h2><p>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.</p></div>
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/static.js?v=1"></script>
</body>
</html>
+1 -1
View File
@@ -34,7 +34,7 @@
<div id="status" class="note" hidden></div>
<div id="kit"><p class="muted">Loading the kit...</p></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/kitpage.js?v=2"></script>
<script src="/assets/promote.js?v=1"></script>
</body>
+1 -1
View File
@@ -40,7 +40,7 @@
<div class="card"><h2>Limits</h2><p>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.</p></div>
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
</main>
<script src="/assets/common.js?v=7"></script>
<script src="/assets/common.js?v=8"></script>
<script src="/assets/static.js?v=1"></script>
</body>
</html>