-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplinks.html
More file actions
53 lines (51 loc) · 2.15 KB
/
applinks.html
File metadata and controls
53 lines (51 loc) · 2.15 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<html>
<head>
<meta property="al:android:url" content="sharesample://story/1234" />
<meta property="al:android:app_name" content="EMMX Dev" />
<meta property="al:android:package" content="com.microsoft.emmx.development" />
<meta property="og:title" content="example title" />
<meta property="og:description" content="example description" />
<meta property="og:image" content="https://www.youtube.com/yts/img/yt_1200-vfl4C3T0K.png" />
<meta name="twitter:card" content="app">
<meta name="twitter:site" content="@Edge">
<meta name="twitter:description" content="Microsoft Edge Android, gives you one continuous browsing experience from your mobile device to your Windows 10 PC. Your stuff syncs in the background, allowing you to browse across devices, without skipping a beat.">
<meta name="twitter:app:name:googleplay" content="Edge">
<meta name="twitter:app:id:googleplay" content="com.microsoft.emmx">
<meta name="twitter:app:url:googleplay" content="https://play.google.com/store/apps/details?id=com.microsoft.emmx">
<script>
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null)
return unescape(r[2]);
return null;
}
</script>
</head>
<body>
<script>
var flag = navigator.userAgent.match(/android/i);
alert(flag);
if(flag) {
var state = null;
try {
state = window.open("sharesample://share/1234?target="+getQueryString("target"));
} catch(e) {}
if(state) {
window.close();
} else {
window.location = getQueryString("target");
}
} else {
window.location = getQueryString("target");
}
// if (location.hash != "#123") {
// history.replaceState(null, null, location.pathname + "#123");
// history.pushState(null, null, location.pathname);
// window.location.replace("https://www.baidu.com");
// } else {
// window.location.replace("https://www.google.com");
// }
</script>
</body>
</html>