diff --git a/public/admin.html b/public/admin.html index 243f2c4..1c6efd0 100644 --- a/public/admin.html +++ b/public/admin.html @@ -28,7 +28,7 @@

Best Coach pot (last week)

Old-link map (JSON {"oldrefs": {"old": "network username"}})

- + diff --git a/public/assets/coach.js b/public/assets/coach.js index 154ad69..b0600e7 100644 --- a/public/assets/coach.js +++ b/public/assets/coach.js @@ -4,11 +4,12 @@ FX.renderNav(''); FX.renderFooter(); const $ = FX.$, esc = FX.esc; const u = decodeURIComponent(location.pathname.replace(/^\/|\/$/g, '')); + document.body.dataset.pageRef = u; // framed: new-tab sign-in and Get a Position links carry ?ref= (common.js) const d = await FX.getJSON('/api/coach?u=' + encodeURIComponent(u)); if (d.error) { $('cName').textContent = 'No coach by that name yet'; return; } $('cName').textContent = '@' + d.username; $('cSince').textContent = 'Coach since ' + FX.when(d.since); $('cStats').innerHTML = '
Positions' + FX.n(d.positions) + '
On the team' + FX.n(d.team.length) + '
Picks started' + FX.n(d.started) + '
'; $('cTeam').innerHTML = d.team.length ? d.team.map(x => FX.card(x)).join('') : '

Their first picks show here.

'; - $('cJoin').href = d.joinUrl; $('cJoin').textContent = 'Join the network free under @' + d.username; + $('cJoin').href = d.joinUrl; $('cJoin').textContent = 'Join the network free under @' + d.username; FX.frameLinks(); })(); diff --git a/public/assets/common.js b/public/assets/common.js index fccfed6..a750fd7 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -5,6 +5,40 @@ window.FX = (function () { const $ = id => document.getElementById(id); const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c])); const getConfig = () => cfgP || (cfgP = fetch('/api/config').then(r => r.json())); + // Traffic exchanges, rotators and Massifly Adpoints show these pages inside another site's frame, where the browser drops the + // fx.ref and sign-in cookies (SameSite=Lax). Framed (Marty 2026-11-19, the IAP / PolHunter / ViralAdBlitz frame pattern): sign-in, + // Get a Position, My Team and off-site links open in a new tab, a new tab back to this site carries ?ref= so it sets the + // cookie first-party, and the wallet buttons (sign in, pay) open this page in a new tab instead. The sponsor: the page's own + // ?ref= (or ?r=), else the coach page it is, else the cookie. + const framed = (() => { try { return window.top !== window.self; } catch (e) { return true; } })(); + const REF_RE = /^[A-Za-z0-9_.-]{2,40}$|^0x[0-9a-fA-F]{40}$/; + function pageRef() { + const q = new URLSearchParams(location.search); const r = q.get('ref') || q.get('r'); + if (r && REF_RE.test(r)) return r; + const pg = document.body && document.body.dataset.pageRef; if (pg && REF_RE.test(pg)) return pg; + const c = /(?:^|;\s*)fx\.ref=([^;]+)/.exec(document.cookie); let v = ''; try { v = c ? decodeURIComponent(c[1]) : ''; } catch (e) {} + return REF_RE.test(v) ? v : ''; + } + const withRef = url => { const r = pageRef(); return r ? url + (url.indexOf('?') < 0 ? '?' : '&') + 'ref=' + encodeURIComponent(r) : url; }; + const NEW_TAB = /^\/(team|join|admin|sso)(\/|$)/; // sign-in, buying and member pages: never usable inside a frame + function frameLink(a) { + if (!framed || !a || !a.href || a.hasAttribute('download')) return; + let x; try { x = new URL(a.href, location.href); } catch (e) { return; } + if (!/^https?:$/.test(x.protocol)) return; + const own = x.origin === location.origin; + if (own && !NEW_TAB.test(x.pathname)) return; // public pages stay in the frame + if (own && /^\/(team|join|sso)(\/|$)/.test(x.pathname) && !x.searchParams.get('ref')) { const r = pageRef(); if (r) { x.searchParams.set('ref', r); a.setAttribute('href', x.pathname + x.search + x.hash); } } + a.target = '_blank'; if (!/noopener/.test(a.rel || '')) a.rel = ((a.rel || '') + ' noopener').trim(); + } + const frameLinks = () => { if (framed) document.querySelectorAll('a[href]').forEach(frameLink); }; + if (framed) { + document.addEventListener('click', e => { + const t = e.target.closest && e.target.closest('a[href], [data-wallet-signin], [data-full-window]'); if (!t) return; + if (t.tagName === 'A') return frameLink(t); + e.preventDefault(); e.stopImmediatePropagation(); window.open(withRef(location.pathname), '_blank', 'noopener'); + }, true); + document.addEventListener('DOMContentLoaded', frameLinks); + } const short = a => a ? a.slice(0, 6) + '...' + a.slice(-4) : ''; const n = x => Number(x || 0).toLocaleString('en-US'); function status(msg, cls, id) { const el = $(id || 'status'); if (!el) return; el.hidden = !msg; el.className = 'note ' + (cls || ''); el.textContent = msg || ''; } @@ -110,7 +144,7 @@ window.FX = (function () { (root || document).querySelectorAll('[data-wallet-signin]').forEach(b => { b.onclick = async () => { try { status('Check your wallet for the sign-in message.'); await FXWallet.signIn(); location.reload(); } catch (e) { status(String(e && e.message || e).slice(0, 300), 'err'); } }; }); } - return { $, esc, getConfig, short, status, getJSON, post, n, polOf, when, ago, left, initials, renderNav, renderFooter, setWeek, weekNo, card, silentSso, signInBlock, wireSignIn }; + return { $, esc, getConfig, short, framed, pageRef, withRef, frameLink, frameLinks, status, getJSON, post, n, polOf, when, ago, left, initials, renderNav, renderFooter, setWeek, weekNo, card, silentSso, signInBlock, wireSignIn }; })(); // Network Weekend ribbon (Marty 2026-11-17): netweekend.js paints it only while a network event is live (dates from the hub through // /api/network-deals). Not on the 1080x1080 draft-day card or the admin page. diff --git a/public/assets/join.js b/public/assets/join.js index afa6c77..62441d5 100644 --- a/public/assets/join.js +++ b/public/assets/join.js @@ -17,7 +17,7 @@ if (!c.shop || !c.shop.live) { $('jPol').textContent = 'Positions open when the contract goes live.'; $('jBuy').disabled = true; return; } const q = await FX.getJSON('/api/quote?qty=' + $('jQty').value); $('jPol').textContent = q.error ? q.error : 'about ' + fmtPol(q.wei, 2) + ' POL at today\'s Chainlink price'; - $('jBuy').disabled = !!q.error || !me.signedIn; + $('jBuy').disabled = !!q.error || (!me.signedIn && !FX.framed); // framed: the button opens this page in a new tab (common.js) } $('jQty').onchange = quote; quote(); $('jBuy').onclick = async () => { diff --git a/public/builder.html b/public/builder.html index 1df6adf..061ca28 100644 --- a/public/builder.html +++ b/public/builder.html @@ -28,7 +28,7 @@
- + diff --git a/public/cards.html b/public/cards.html index aeda2a4..5768240 100644 --- a/public/cards.html +++ b/public/cards.html @@ -28,7 +28,7 @@

The five tiers

Rookie when drafted, Starter when they link a wallet, Pro when they switch on payouts, All-Star at their first purchase, Hall of Fame when they hold a position of their own and coach a team. Tap a card to flip it for the stats on the back.

- + diff --git a/public/coach.html b/public/coach.html index ac03848..e79c41a 100644 --- a/public/coach.html +++ b/public/coach.html @@ -27,8 +27,8 @@

The team

Milestones only. Every Monday this coach drafts people who joined the network without a sponsor and helps them get started.

- - + + diff --git a/public/contract.html b/public/contract.html index e16c491..054f800 100644 --- a/public/contract.html +++ b/public/contract.html @@ -26,7 +26,7 @@

CONTRACT

Check the contract yourself

Read live from Polygon. No owner withdraw, no proxy, the split fixed in the code.

- + diff --git a/public/disclaimer.html b/public/disclaimer.html index e3e311d..223ac47 100644 --- a/public/disclaimer.html +++ b/public/disclaimer.html @@ -30,7 +30,7 @@

Prices and taxes

Positions are priced in US dollars and paid in POL, whose price moves. You are responsible for any taxes on what you receive where you live.

Who to ask

TrustClickz. Network support.

- + diff --git a/public/draftday.html b/public/draftday.html index ed7ad73..9b08456 100644 --- a/public/draftday.html +++ b/public/draftday.html @@ -15,4 +15,4 @@ h1{margin:0;font-family:Oswald,Impact,sans-serif;font-weight:700;font-size:108px
5XYOURTEAM

DRAFT DAY
RESULTS

5xyourteam.com
- + diff --git a/public/guides.html b/public/guides.html index c4684b5..d1a3e54 100644 --- a/public/guides.html +++ b/public/guides.html @@ -30,7 +30,7 @@

Check it yourself

The contract page reads the DraftPosition contract live from Polygon, and the ledger lists every payment with its transaction. The card collection shows how picks level up.

Still stuck? Ask the chat assistant on any page, or open network support.

A position buys a draft spot and coaching tools, not income. Nothing is promised.

- + diff --git a/public/guides/coaching-your-picks.html b/public/guides/coaching-your-picks.html index 79d9aa5..388603b 100644 --- a/public/guides/coaching-your-picks.html +++ b/public/guides/coaching-your-picks.html @@ -35,7 +35,7 @@

More guides

  • How The Draft works: Draft day, rounds, the pick clock, earned draft order, and what happens to picks that do not start.
  • Is 5xYourTeam legit?: The DraftPosition contract, the live ledger and exactly where the $10 goes.
  • 5xYourTeam FAQ: Short answers to the questions coaches ask most.

A position buys a draft spot and coaching tools, not income. Nothing is promised.

- + diff --git a/public/guides/faq.html b/public/guides/faq.html index 6f42f46..44e8396 100644 --- a/public/guides/faq.html +++ b/public/guides/faq.html @@ -46,7 +46,7 @@

More guides

  • How The Draft works: Draft day, rounds, the pick clock, earned draft order, and what happens to picks that do not start.
  • Is 5xYourTeam legit?: The DraftPosition contract, the live ledger and exactly where the $10 goes.
  • Coaching your picks: Your team page, the five getting-started steps, site messages and who to help first.

A position buys a draft spot and coaching tools, not income. Nothing is promised.

- + diff --git a/public/guides/how-the-draft-works.html b/public/guides/how-the-draft-works.html index 1419c56..44d0e52 100644 --- a/public/guides/how-the-draft-works.html +++ b/public/guides/how-the-draft-works.html @@ -36,7 +36,7 @@

More guides

  • Is 5xYourTeam legit?: The DraftPosition contract, the live ledger and exactly where the $10 goes.
  • Coaching your picks: Your team page, the five getting-started steps, site messages and who to help first.
  • 5xYourTeam FAQ: Short answers to the questions coaches ask most.

A position buys a draft spot and coaching tools, not income. Nothing is promised.

- + diff --git a/public/guides/is-5xyourteam-legit.html b/public/guides/is-5xyourteam-legit.html index a9e31e5..41d44f7 100644 --- a/public/guides/is-5xyourteam-legit.html +++ b/public/guides/is-5xyourteam-legit.html @@ -34,7 +34,7 @@

More guides

  • How The Draft works: Draft day, rounds, the pick clock, earned draft order, and what happens to picks that do not start.
  • Coaching your picks: Your team page, the five getting-started steps, site messages and who to help first.
  • 5xYourTeam FAQ: Short answers to the questions coaches ask most.

A position buys a draft spot and coaching tools, not income. Nothing is promised.

- + diff --git a/public/index.html b/public/index.html index 843e5eb..e9d4b5e 100644 --- a/public/index.html +++ b/public/index.html @@ -56,7 +56,7 @@ - + diff --git a/public/join.html b/public/join.html index e951004..cec499c 100644 --- a/public/join.html +++ b/public/join.html @@ -28,15 +28,15 @@
What you get
  • 5 instant picks from this week's pool
  • A spot in every Monday draft, 5 rounds
  • Coaching tools: scouting stats, the steps, site messages, who to help first
  • A coach page and trading cards for your team
  • Up to 10 open picks at a time

Buy

-
+

Anything you send above the exact price comes back to you in the same transaction. Payments are final once confirmed.

Where your $10 goes, in the same transaction

Your sponsor gets 25% and levels 2 to 5 of your network sponsor line get 5% each. Only people who hold a position can receive a share: anyone in your line who does not is passed over and the share goes up to the next person who does. 10% goes to the weekly Best Coach pot and 45% to 5xYourTeam. The contract keeps nothing. Check it on the contract page and every payment on the ledger.

A position buys a draft spot and coaching tools, not income. Nothing is promised.

- + - + diff --git a/public/ledger.html b/public/ledger.html index a16fb8e..edde6aa 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -28,7 +28,7 @@
WHENPOSITIONPAID IN THE SAME TRANSACTION

Best Coach payouts

WEEKCOACHPOL
- + diff --git a/public/privacy.html b/public/privacy.html index bbcbaa1..5613cb8 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -32,7 +32,7 @@

Your choices

You can ask us to remove your account and messages here. Records on the blockchain cannot be removed by anyone.

Contact

TrustClickz. Network support. Last updated November 15, 2026.

- + diff --git a/public/promote.html b/public/promote.html index 96737a7..b208ad3 100644 --- a/public/promote.html +++ b/public/promote.html @@ -28,7 +28,7 @@
- + diff --git a/public/team.html b/public/team.html index be373a1..5283498 100644 --- a/public/team.html +++ b/public/team.html @@ -52,7 +52,7 @@ - + diff --git a/public/terms.html b/public/terms.html index 4e4b99f..558567d 100644 --- a/public/terms.html +++ b/public/terms.html @@ -37,7 +37,7 @@

The service

The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public on the contract page. We may change features, draft settings, the price of future positions or these terms; changes apply from the date they are posted here. As far as the law allows, 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

TrustClickz. Network support. Last updated November 15, 2026.

- + diff --git a/server.js b/server.js index 8114d28..449f9db 100644 --- a/server.js +++ b/server.js @@ -232,6 +232,15 @@ const server = http.createServer(async (req, res) => { { const host = String(req.headers.host || '').toLowerCase().split(':')[0]; if (C.isProd && host !== C.site && host.endsWith('.' + C.site)) { res.writeHead(301, { Location: 'https://' + C.site + req.url, 'Cache-Control': 'no-store' }); return res.end(); } } try { + // a framed page's sign-in opens in a new tab as /sso/start?...&ref= (the frame dropped the fx.ref cookie, 2026-11-19): + // keep the sponsor first-party here, then the normal start. Sign-in hand-offs are never shown in a frame. + if (req.method === 'GET' && p === '/sso/start' && u.searchParams.has('ref')) { + const ref = u.searchParams.get('ref'); u.searchParams.delete('ref'); + const h = { Location: p + u.search, 'Cache-Control': 'no-store', 'X-Frame-Options': 'DENY', 'Referrer-Policy': 'no-referrer' }; + if (NAME_RE.test(ref) || ADDR_RE.test(ref)) h['Set-Cookie'] = cookie('fx.ref', ref, 30 * 86400, false); + res.writeHead(302, h); return res.end(); + } + if (req.method === 'GET' && p.startsWith('/sso/')) res.setHeader('X-Frame-Options', 'DENY'); if (req.method === 'GET' && await networksso.page(req, res, u)) return; // network hub: daily activity ping + the hub sign-in push (2026-11-15) if (req.method === 'GET' && (p.startsWith('/sso/') || p === '/api/sso/status') && await networksso.handle(req, res, u)) return; if ((p === '/api/promo-kit' || p === '/promote') && promokit.handle(req, res, u, sendFile)) return;