Keep Stripe checkout in a popup
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user