diff --git a/index.html b/index.html index 44e4e02..9537293 100644 --- a/index.html +++ b/index.html @@ -2370,9 +2370,16 @@ function updateHubLinks() { } } -function showSponsorNudge() { +function showSponsorNudge(kind) { const el = document.getElementById('sponsorNudge'); - if (el) el.style.display = 'block'; + if (!el) return; + if (kind === 'sponsor') { + // Endpoint resolved the CBP ref from the member's UPLINE sponsor's entry + // (fallback chain: own entry → upline's entry → company). Alignment held, + // but the sharer should still claim their own referrals. + el.innerHTML = '⚠️ This sponsor hasn’t added their own ClickBaitPays username in CryptoTeamBuild yet, so sign-ups credit their upline sponsor for now. Sponsors: log into CryptoTeamBuild → Downline Builder → ClickBaitPays → enter your ClickBaitPays username, and your links switch to you automatically.'; + } + el.style.display = 'block'; } async function resolveIdentity() { @@ -2387,6 +2394,7 @@ async function resolveIdentity() { if (r.found) { IDENT.cbp = r.cbpUsername; IDENT.ctb = r.ctbUsername; + if (r.source === 'sponsor') IDENT.uplineFallback = true; } else { const rv = await fetch(`${CTB_LOOKUP_URL}?cbp=${encodeURIComponent(ctbParam)}`).then(x => x.json()); if (rv.found) { @@ -2413,6 +2421,7 @@ async function resolveIdentity() { if (f.found) { IDENT.cbp = f.cbpUsername; IDENT.ctb = f.ctbUsername; + if (f.source === 'sponsor') IDENT.uplineFallback = true; } } } @@ -2423,6 +2432,7 @@ async function resolveIdentity() { updateSharedLinkBox(); updateHubLinks(); if (IDENT.fallback) showSponsorNudge(); + else if (IDENT.uplineFallback) showSponsorNudge('sponsor'); } function getBaseUrl() {