Login ad on a clock, hop back to the asking site, 5xYourTeam in the wallets map, signed-out login slot refused (Marty 2026-11-15)
Login ad: every Control Room page asks (cr-shell.js loginAd, the per-tab sessionStorage guard is gone); the server answers with an ad only when the member's last finished view on LinkSpin is older than loginAdEveryHours (site setting, default 3). loginadclock.js (the same file as InstantAdPay), MySQL table login_ad_views through DOCSTORE_URL. POST /api/ads/login/seen at the end of the countdown restarts the clock only if the serve was dwell-2 s earlier. Member erase forgets the row. Admin site setting label.
Signed out: /api/ads/slot?type=login draws nothing and counts no view (bots, probes, previews cannot run up an advertiser's numbers).
Hop: a member who signed in here because another network site asked ("Sign in with LinkSpin", nsso.back) goes back there after the login ad (/sso/resume), from every Control Room screen, not only the retired /my.
networksso.js: the network-wide copy (loop guard 120 s, fivex, unknown r refused); fivex added to the wallets map (FIVEX_URL, default https://5xyourteam.com).
Tests: qa/networksso-partner.e2e.mjs (same file as InstantAdPay, in run.sh): partner via LinkSpin, LinkSpin clock, signed-out slot; networksso e2e retries a keep-alive ECONNRESET. qa sso: ALL PASSED; qa member: ALL PASSED (2 known warnings; networksso e2e flaked on ECONNRESET once, passes with the retry).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -550,6 +550,6 @@
|
||||
|
||||
<script src="/assets/common.js?v=20261115nr"></script>
|
||||
<script src="/assets/admin-kb.js?v=20261020kb"></script>
|
||||
<script src="/assets/admin.js?v=20261112txt"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-refill.js?v=20261024rf"></script><script src="/assets/admin-kits.js?v=20261024kit"></script><script src="/assets/admin-launchweek.js?v=20261105lw"></script>
|
||||
<script src="/assets/admin.js?v=20261115la"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-refill.js?v=20261024rf"></script><script src="/assets/admin-kits.js?v=20261024kit"></script><script src="/assets/admin-launchweek.js?v=20261105lw"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/ads-screen.js?v=20261114tu"></script>
|
||||
<script src="/assets/fuel.js?v=20261113sso"></script>
|
||||
<script src="/assets/engine-room.js?v=20261113sso"></script>
|
||||
|
||||
@@ -1093,7 +1093,7 @@
|
||||
}));
|
||||
|
||||
// site settings: key / value rows; booleans as checkboxes, numbers stay numbers
|
||||
const SITE_META = { noPayoutIds: 'No-payout positions (member #s, comma): linkage only, no buys from them, no joins routed under them', siteName: 'Site name', tagline: 'Tagline', rehearsal: 'Testnet rehearsal banner', defaultSponsorId: 'Fallback sponsor (member #)', walletConnectProjectId: 'WalletConnect project id', telegramBotToken: 'Telegram proof feed: bot token', telegramChatId: 'Telegram proof feed: chat id', telegramTopicId: 'Telegram proof feed: topic id (optional)', telegramEvents: 'Telegram proof feed: events (payouts | payouts+purchases | all)', telegramCtaUrl: 'Telegram proof feed: join link under each post', aiCreditsPerGen: 'AI Copy Engine: credits per generation after the free allowance', aiFreeSurge: 'AI Copy Engine: free generations a month at Surge', aiFreeCircuit: 'AI Copy Engine: free generations a month at Circuit', aiFreeNexus: 'AI Copy Engine: free generations a month at Nexus', snapshotEnabled: 'Daily growth snapshot to Telegram (1/0)', snapshotHourUtc: 'Daily growth snapshot: hour (UTC; 14 = 9 AM Central)', snapshotTargets: 'Daily growth snapshot: targets (feed = proof channel, support = LinkSpin Support topic, echo = shared payments topic; comma list)', telegramSupportChatId: 'Telegram LinkSpin Support topic: chat id', telegramSupportTopicId: 'Telegram LinkSpin Support topic: topic id', pipelineMode: 'Pipeline board: off (coming soon card) | preview (admin account only) | on (everyone)', pipelineEta: 'Pipeline: opening date shown on the coming-soon card (e.g. Sep 28)', memberWeeklyEmail: 'Weekly member email to everyone active (1) or only sponsors with a line (0)', leaderboardWeeklyPrize: 'Leaderboard: weekly prize text (optional; blank shows the credit ladder)', leaderboardMonthlyPrize: 'Leaderboard: monthly prize text (optional)', leaderboardWeeklyCredits: 'Leaderboard: weekly credits for 1st,2nd,3rd… (e.g. 1000,500,250; blank = none)', leaderboardMonthlyCredits: 'Leaderboard: monthly credits for 1st,2nd,3rd… (e.g. 5000,2500,1000)', leaderboardAnnounceGeneral: 'Leaderboard: announce winners in the main group too (1/0)', telegramEchoChatId: 'Telegram echo (shared payments topic): chat id', telegramEchoTopicId: 'Telegram echo: topic id', telegramEchoEvents: 'Telegram echo: events (payouts | payouts+purchases | all)', legacyCreditsAdvertiser: 'Legacy welcome credits: former advertisers', legacyCreditsEarner: 'Legacy welcome credits: former earners', pnlFixedMonthlyUsd: 'P&L: fixed monthly cost (USD)', campaignEditFee: 'Ad edits: credits per edit after the first, free one on each ad (0 = always free)' };
|
||||
const SITE_META = { loginAdEveryHours: 'Login ad: show again on the next member page once the last finished view is this many hours old (default 3)', noPayoutIds: 'No-payout positions (member #s, comma): linkage only, no buys from them, no joins routed under them', siteName: 'Site name', tagline: 'Tagline', rehearsal: 'Testnet rehearsal banner', defaultSponsorId: 'Fallback sponsor (member #)', walletConnectProjectId: 'WalletConnect project id', telegramBotToken: 'Telegram proof feed: bot token', telegramChatId: 'Telegram proof feed: chat id', telegramTopicId: 'Telegram proof feed: topic id (optional)', telegramEvents: 'Telegram proof feed: events (payouts | payouts+purchases | all)', telegramCtaUrl: 'Telegram proof feed: join link under each post', aiCreditsPerGen: 'AI Copy Engine: credits per generation after the free allowance', aiFreeSurge: 'AI Copy Engine: free generations a month at Surge', aiFreeCircuit: 'AI Copy Engine: free generations a month at Circuit', aiFreeNexus: 'AI Copy Engine: free generations a month at Nexus', snapshotEnabled: 'Daily growth snapshot to Telegram (1/0)', snapshotHourUtc: 'Daily growth snapshot: hour (UTC; 14 = 9 AM Central)', snapshotTargets: 'Daily growth snapshot: targets (feed = proof channel, support = LinkSpin Support topic, echo = shared payments topic; comma list)', telegramSupportChatId: 'Telegram LinkSpin Support topic: chat id', telegramSupportTopicId: 'Telegram LinkSpin Support topic: topic id', pipelineMode: 'Pipeline board: off (coming soon card) | preview (admin account only) | on (everyone)', pipelineEta: 'Pipeline: opening date shown on the coming-soon card (e.g. Sep 28)', memberWeeklyEmail: 'Weekly member email to everyone active (1) or only sponsors with a line (0)', leaderboardWeeklyPrize: 'Leaderboard: weekly prize text (optional; blank shows the credit ladder)', leaderboardMonthlyPrize: 'Leaderboard: monthly prize text (optional)', leaderboardWeeklyCredits: 'Leaderboard: weekly credits for 1st,2nd,3rd… (e.g. 1000,500,250; blank = none)', leaderboardMonthlyCredits: 'Leaderboard: monthly credits for 1st,2nd,3rd… (e.g. 5000,2500,1000)', leaderboardAnnounceGeneral: 'Leaderboard: announce winners in the main group too (1/0)', telegramEchoChatId: 'Telegram echo (shared payments topic): chat id', telegramEchoTopicId: 'Telegram echo: topic id', telegramEchoEvents: 'Telegram echo: events (payouts | payouts+purchases | all)', legacyCreditsAdvertiser: 'Legacy welcome credits: former advertisers', legacyCreditsEarner: 'Legacy welcome credits: former earners', pnlFixedMonthlyUsd: 'P&L: fixed monthly cost (USD)', campaignEditFee: 'Ad edits: credits per edit after the first, free one on each ad (0 = always free)' };
|
||||
function drawSite() {
|
||||
const wrap = $('siteForm');
|
||||
wrap.innerHTML = Object.entries(siteObj).map(([k, v]) => '<div class="kv-row"><span class="k" title="' + esc(k) + '">' + esc(SITE_META[k] || humanize(k)) + '</span>'
|
||||
|
||||
@@ -195,9 +195,11 @@ window.CR = (function () {
|
||||
go.addEventListener('click', step);
|
||||
host.querySelector('.modal').addEventListener('keydown', e => { if (e.key === 'Enter') step(); });
|
||||
}
|
||||
// login ad on the member's clock (Marty 2026-11-15): every Control Room page asks; the server answers with an ad only when the
|
||||
// last finished view is older than loginAdEveryHours (loginadclock.js), and the end of the countdown restarts that clock
|
||||
let laAsked = false;
|
||||
async function loginAd() {
|
||||
let seen = false; try { seen = !!sessionStorage.getItem('ls.la'); } catch (e) {}
|
||||
if (seen) return; try { sessionStorage.setItem('ls.la', '1'); } catch (e) {}
|
||||
if (laAsked) return; laAsked = true;
|
||||
let ad = null; try { ad = (await get('/api/ads/slot?type=login')).ad; } catch (e) { return; }
|
||||
if (!ad || !ad.targetUrl) return;
|
||||
await new Promise(done => {
|
||||
@@ -210,7 +212,7 @@ window.CR = (function () {
|
||||
back.querySelector('#laOpen').addEventListener('click', () => {
|
||||
window.open(ad.targetUrl, '_blank'); back.querySelector('#laOpen').disabled = true;
|
||||
let left = ad.dwell || 10; const t = back.querySelector('#laTimer'); t.hidden = false; t.textContent = left + ' s';
|
||||
const iv = setInterval(() => { left -= 1; if (left > 0) { t.textContent = left + ' s'; return; } clearInterval(iv); t.textContent = 'done'; back.querySelector('#laStatus').textContent = 'Thanks for the look.'; back.querySelector('#laGo').hidden = false; }, 1000);
|
||||
const iv = setInterval(() => { left -= 1; if (left > 0) { t.textContent = left + ' s'; return; } clearInterval(iv); t.textContent = 'done'; fetch('/api/ads/login/seen', { method: 'POST' }).catch(() => {}); back.querySelector('#laStatus').textContent = 'Thanks for the look.'; back.querySelector('#laGo').hidden = false; }, 1000);
|
||||
});
|
||||
back.querySelector('#laGo').addEventListener('click', () => { back.remove(); done(); });
|
||||
});
|
||||
@@ -283,7 +285,10 @@ window.CR = (function () {
|
||||
const small = () => { box.innerHTML = '<span class="ink2">Remembered who invited you? <a href="#" id="inviteBack">Tell us</a></span>'; $('inviteBack').addEventListener('click', e => { e.preventDefault(); full(); $('inviteWho').focus(); }); };
|
||||
if (ask.dismissed) small(); else full();
|
||||
}
|
||||
async function requireSession(onReady) { let m = await me(); whoPaint(m); themeSync(m); if (m && m.signedIn) { strip(); helpBadge(); tankItem(); m = await ensureUsername(m); await loginAd(); inviteCard(m); return onReady(m); } signInFlow(async r => { whoPaint(r); themeSync(r); strip(); helpBadge(); await loginAd(); me(true).then(inviteCard); onReady(r); }); }
|
||||
// a network sign-in hop waiting on this sign-in (another site asked "Sign in with LinkSpin" while signed out here): finish it
|
||||
// after the login ad, back to the site and page it came from, never left on the Control Room (2026-11-15)
|
||||
const hopBack = m => { if (m && m.signedIn && m.nssoBack && m.username) { location.href = '/sso/resume'; return true; } return false; };
|
||||
async function requireSession(onReady) { let m = await me(); whoPaint(m); themeSync(m); if (m && m.signedIn) { strip(); helpBadge(); tankItem(); m = await ensureUsername(m); await loginAd(); if (hopBack(m)) return; inviteCard(m); return onReady(m); } signInFlow(async r => { whoPaint(r); themeSync(r); strip(); helpBadge(); let m2 = await me(true); m2 = await ensureUsername(m2); await loginAd(); if (hopBack(m2)) return; inviteCard(m2); onReady(m2 && m2.signedIn ? m2 : r); }); }
|
||||
// tiles with a sparkline and a delta chip (Instrument scheme, 2026-09-29): series = numbers oldest first
|
||||
function sparkline(series) {
|
||||
const s = (series || []).map(Number); if (s.length < 2 || !s.some(Boolean)) return '';
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<div id="goalReports"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/conversions.js?v=20261026a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20261115nr"></script>
|
||||
<script src="/assets/wallet.js?v=20261021a"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/credits-screen.js?v=20261107tg"></script>
|
||||
<script src="/assets/fuel.js?v=20261112sso"></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
<div id="page">
|
||||
<div class="body" id="helpBody"><div class="panel"><span class="muted">loading</span></div></div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/help-screen.js?v=20261016a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -270,7 +270,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/links.js?v=20261111big"></script>
|
||||
<script src="/assets/banner-spin.js?v=20261114bc"></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -1016,7 +1016,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20261115nr"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/tools.js?v=20261011a"></script>
|
||||
<script src="/assets/wallet.js?v=20261021a"></script>
|
||||
<script src="/assets/promo.js?v=20261020bs3"></script>
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/pages-screen.js?v=20261021t"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/reports.js?v=20261107nc"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/traffic-guide-data.js?v=20261028a"></script>
|
||||
<script src="/assets/sources-screen.js?v=20261028a"></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/team.js?v=20261113org"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="rules" id="rules"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/traffic-guide-data.js?v=20261028a"></script>
|
||||
<script src="/assets/traffic-guide.js?v=20261029b"></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/wallet-screen.js?v=20261023ov"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261114tu"></script>
|
||||
<script src="/assets/cr-shell.js?v=20261115la"></script>
|
||||
<script src="/assets/zones-screen.js?v=20261010a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user