Skip to content

Instantly share code, notes, and snippets.

@bopbi
Created December 22, 2024 08:53
Show Gist options
  • Save bopbi/3bda23be7abb4a8a398dc71eeed8b8b7 to your computer and use it in GitHub Desktop.
Save bopbi/3bda23be7abb4a8a398dc71eeed8b8b7 to your computer and use it in GitHub Desktop.
Redirect back to app
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
</head>
<body>
<h1>Redirecting you back to the app...</h1>
<p>If you are not redirected automatically, <a id="manualLink" href="bobby://success">click here</a>.</p>
<script>
// Deep link URL
const deepLink = "bobby://success";
// Redirect to the deep link
function redirectToApp() {
window.location.href = deepLink;
}
// Attempt to redirect after a short delay
setTimeout(redirectToApp, 1000); // 1-second delay
// Update the manual link for fallback
document.getElementById("manualLink").href = deepLink;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment