diff --git a/a.jar b/a.jar new file mode 100644 index 0000000..7394399 --- /dev/null +++ b/a.jar @@ -0,0 +1,5 @@ +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +#HttpOnly_127.0.0.1 FALSE / FALSE 1788867258 iap.sid ef5bf189318d5c20a0d3c252de07f6c5d3b15d05c4749e71344c5e279ff8f35f diff --git a/b.jar b/b.jar new file mode 100644 index 0000000..670e8ca --- /dev/null +++ b/b.jar @@ -0,0 +1,5 @@ +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +#HttpOnly_127.0.0.1 FALSE / FALSE 1788867258 iap.sid 83b4332fb0ddfa471e537298108a022c1c214444846494075bfa4d432ac7a683 diff --git a/p.jar b/p.jar new file mode 100644 index 0000000..63b6835 --- /dev/null +++ b/p.jar @@ -0,0 +1,5 @@ +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +#HttpOnly_127.0.0.1 FALSE / FALSE 1788866028 iap.sid 6ee49f05f7b3b754792fda5f81d92f5d79f8e560853a982c2234ceae281d552c diff --git a/public/assets/my.js b/public/assets/my.js index 07fd3c4..f638c92 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -769,6 +769,14 @@ $('vidStartBtn').textContent = 'Next video'; } $('vidStartBtn').addEventListener('click', () => loadVideoAd()); + // presence enforcement: pause the watch-to-earn video when the tab/window loses focus, + // resume when it comes back — the viewer must stay on the page for the watch to complete + document.addEventListener('visibilitychange', () => { + const p = $('vidPlayer'); if (!p || !p.src) return; + if (document.hidden) p.pause(); else if (!vidState.done) p.play().catch(() => {}); + }); + window.addEventListener('blur', () => { const p = $('vidPlayer'); if (p && p.src) p.pause(); }); + window.addEventListener('focus', () => { const p = $('vidPlayer'); if (p && p.src && !vidState.done) p.play().catch(() => {}); }); // ── unmissable sponsor-message modal on sign-in ── function showSponsorModal(msg) { @@ -1215,6 +1223,7 @@ const s = g.slides[i]; $('ggWho').textContent = 'Position ' + (i + 1) + ': ' + s.name + (i === 0 ? ' — the person who invited you' : ''); $('ggProgress').textContent = 'Meeting your line: ' + (i + 1) + ' of ' + g.slides.length; + $('ggFrame').hidden = false; $('ggFrame').src = s.targetUrl; let left = g.dwell || 10; $('ggTimer').textContent = left + 's'; @@ -1228,6 +1237,7 @@ }); } $('ggFrame').src = 'about:blank'; + $('ggFrame').hidden = true; // avoid a white about:blank panel once the tour is done $('ggTimer').textContent = '✓'; $('ggWho').textContent = 'That is your line. When you grow, they earn — and yours starts the day you share.'; $('ggClaim').hidden = false; @@ -1371,17 +1381,24 @@ } // ── SPONSOR CHAT: two-way threads, presence-aware, with a slide-in drawer ── - let CHAT_ME = null, CHAT_OTHER = null, CHAT_LASTID = 0, CHAT_POLL = null, CHAT_CANMUTE = false, CHAT_IMUTE = false; + let CHAT_ME = null, CHAT_OTHER = null, CHAT_LASTID = 0, CHAT_POLL = null, CHAT_CANMUTE = false, CHAT_IMUTE = false, CHAT_SPONSOR = null; function chatSync(d) { CHAT_ME = d.email || CHAT_ME; + CHAT_SPONSOR = (d.sponsor && d.sponsor.email) ? d.sponsor : null; const link = $('chatMenuBtn'); if (link && link.closest('.bo-links')) link.closest('.bo-links').hidden = !d.email; setChatBadge(d.chatUnread || 0); const tog = $('chatAvailToggle'); if (tog) tog.checked = d.chatAvailable !== false; + // Overview quick action + My line card: message-your-sponsor entry points const qs = $('qaMsgSponsor'); if (qs) { - if (d.sponsor && d.sponsor.email) { qs.hidden = false; qs.dataset.email = d.sponsor.email; qs.dataset.name = d.sponsor.name || 'your sponsor'; } + if (CHAT_SPONSOR) { qs.hidden = false; qs.dataset.email = CHAT_SPONSOR.email; qs.dataset.name = CHAT_SPONSOR.name || 'your sponsor'; } else qs.hidden = true; } + const card = $('sponsorMsgCard'); + if (card) { + card.hidden = !CHAT_SPONSOR; + if (CHAT_SPONSOR && $('sponsorMsgName')) $('sponsorMsgName').textContent = CHAT_SPONSOR.name || 'your sponsor'; + } } function setChatBadge(n) { const b = $('chatNavBadge'); if (b) { b.hidden = !n; b.textContent = n > 9 ? '9+' : n; } } function stopPoll() { if (CHAT_POLL) { clearInterval(CHAT_POLL); CHAT_POLL = null; } } @@ -1399,8 +1416,16 @@ try { const r = await (await fetch('/api/my/chat/threads')).json(); const list = r.threads || []; - if (!list.length) { $('chatThreads').innerHTML = '
Questions getting started? Message your sponsor directly. + If they are online you chat live; if not, it lands in their inbox and they are notified.
+ +Share it anywhere, starting now. Everyone who joins through it becomes part of @@ -627,9 +633,9 @@