Ad view: reliable exit on mobile/dApp browsers

window.close() is blocked in mobile and in-app wallet (dApp) browsers, which left
users stuck on the ad-view tab. Made "Back to dashboard" the primary action, and
"Close tab" now falls back to navigating to /my#earn when the browser refuses to
close the tab.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-08 07:17:39 -05:00
parent 8d9f56f68a
commit 50c0bd1aa7
2 changed files with 9 additions and 4 deletions
+3 -3
View File
@@ -38,12 +38,12 @@
<span class="vmsg" id="vMsg">Loading the ad…</span>
<span class="vcheck" id="vCheck"><span class="prompt" id="vPrompt"></span><span id="vOpts"></span></span>
<span class="vdone" id="vDone">
<button class="btn small" id="vClose" type="button">Close tab</button>
<a class="btn small sec" href="/my#earn">Back to dashboard</a>
<a class="btn small" href="/my#earn">Back to dashboard</a>
<button class="btn small sec" id="vClose" type="button">Close tab</button>
</span>
</div>
<iframe class="vframe" id="vFrame" sandbox="allow-scripts allow-same-origin allow-forms allow-popups" referrerpolicy="no-referrer" title="Advertiser site"></iframe>
</div>
<script src="/assets/view.js?v=20260906m"></script>
<script src="/assets/view.js?v=20260908a"></script>
</body>
</html>