Keep Stripe checkout in a popup

This commit is contained in:
hz
2026-07-20 16:42:17 -05:00
parent d142da2f78
commit 2dd4fa6420
4 changed files with 75 additions and 4 deletions
+20 -1
View File
@@ -15,5 +15,24 @@
</style>
</head>
<script>try{document.documentElement.dataset.theme=localStorage.getItem('medmind-color-scheme')||''}catch(e){}</script>
<body><main><img src="/ranaze-loader-icon-v1.png" alt="RanaZe" width="320" height="270"><h1>Checkout canceled</h1><p>No contribution was completed.</p><a href="/">Return to RanaZe</a></main></body>
<body><main><img src="/ranaze-loader-icon-v1.png" alt="RanaZe" width="320" height="270"><h1>Checkout canceled</h1><p>No contribution was completed. Returning you to the app...</p><a id="return-to-app" href="/">Return to RanaZe</a></main>
<script>
(() => {
const returnToApp = () => {
if (window.opener && !window.opener.closed) {
window.opener.focus();
window.close();
return;
}
window.location.assign('/');
};
document.getElementById('return-to-app').addEventListener('click', (event) => {
if (window.opener && !window.opener.closed) {
event.preventDefault();
returnToApp();
}
});
window.setTimeout(returnToApp, 1200);
})();
</script></body>
</html>