-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
38 lines (27 loc) · 836 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<title>Sifa Clinic</title>
</head>
<body>
<script>
function getFacebookUrl() {
let userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
return "fb://profile/100063563259367";
}
if (/android/i.test(userAgent)) {
return "intent://profile/100063563259367#Intent;package=com.facebook.katana;scheme=fb;end";
}
// iOS detection from: http://stackoverflow.com/a/9039885/177710
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "fb://profile/100063563259367";
}
return "https://facebook.com/sifaclinic";
}
let url = getFacebookUrl();
window.location.replace(url);
</script>
</body>
</html>