[mobile] Try to open the app via Custom URL Scheme Plugin, if not installed forward to app store.
<!--
Custom URL Scheme Plugin:
https://github.com/EddyVerbruggen/Custom-URL-scheme/tree/4.2.0
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script>
window.onload = function() {
setTimeout(function() {
this.location.href = 'tanistirkazan://';
}, 500);
setTimeout(function() {
var os = getMobileOS();
if (os == 'iOS') {
this.location.href = 'https://itunes.apple.com/tr/app/tan-st-r-kazan/id1103774486&mt=8?pt=118185099';
} else if (os == 'Android') {
this.location.href = 'https://play.google.com/store/apps/details?id=com.intromoney.tanistirkazan';
}
}, 550);
}
function getParameterByName(name) {
var url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
function getMobileOS() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/android/i.test(userAgent)) {
return "Android";
}
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "iOS";
}
return "unknown";
}
</script>
<style>
html, body {
margin: 0;
width: 100%;
height: 100%;
}
div.logo {
width: 100%;
height: 100%;
background: url('img/open-app/logo.png') no-repeat center;
background-size: 60%;
background-color: #f5f5f5;
}
</style>
</head>
<body>
<div class="logo"></div>
</body>
</html>