Unblock testing: message-your-sponsor entries, video pause-on-blur, tour polish
- Sponsor messaging is now reachable everywhere a new referral looks: a "Message your sponsor" card on My line, the Overview quick action, and a pinned "Message your sponsor" row atop the Messages drawer (even with no thread yet). Chat stores the sponsor from the dashboard. - Watch-to-earn video + Shorts now PAUSE when the tab/window loses focus and resume on return, so a viewer must stay on the page for the watch to count. - Welcome tour hides its frame on completion (no white about:blank panel). NOTE: rmcircle.team allows framing (frame-ancestors *); the blank was just the post-dwell blank state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,13 @@
|
||||
$('shNext').hidden = false;
|
||||
}
|
||||
$('shNext').addEventListener('click', load);
|
||||
// presence enforcement: pause when the tab/window loses focus, resume on return
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
const v = $('shVideo'); if (!v || !v.src) return;
|
||||
if (document.hidden) v.pause(); else if (!st.done) v.play().catch(() => {});
|
||||
});
|
||||
window.addEventListener('blur', () => { const v = $('shVideo'); if (v && v.src) v.pause(); });
|
||||
window.addEventListener('focus', () => { const v = $('shVideo'); if (v && v.src && !st.done) v.play().catch(() => {}); });
|
||||
// tap the video to pause/resume
|
||||
$('shVideo').addEventListener('click', () => { const v = $('shVideo'); if (v.paused) v.play(); else v.pause(); });
|
||||
load();
|
||||
|
||||
Reference in New Issue
Block a user