Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
anandarai authored Nov 27, 2024
0 parents commit ffe7012
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
<script>
// Redirect logic
document.addEventListener("DOMContentLoaded", function () {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;

// Check if the user is on an Android device
if (/android/i.test(userAgent)) {
// Redirect to Google Play Store
window.location.href = "https://play.google.com/store/apps/details?id=com.example.app";
}
// Check if the user is on an iOS device
else if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
// Redirect to Apple App Store
window.location.href = "https://apps.apple.com/app/example-app/id1234567890";
}
// Fallback for other devices or unsupported systems
else {
document.body.innerHTML = `
<h1>Unsupported Device</h1>
<p>Please visit our app stores on your mobile device.</p>
<p><a href="https://example.com">Visit Website</a></p>
`;
}
});
</script>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin-top: 50px;
}
</style>
</head>
<body>
<p>Redirecting to the appropriate app store...</p>
</body>
</html>

0 comments on commit ffe7012

Please sign in to comment.