-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurlScheme.html
More file actions
67 lines (61 loc) · 2.05 KB
/
Copy pathurlScheme.html
File metadata and controls
67 lines (61 loc) · 2.05 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html>
<head>
<title>url Scheme</title>
<meta property="og:image" content="https://exgs.github.io/yunsleeMap/1000*500.jpeg"/>
<meta property="og:url" content="https://exgs.github.io/yunsleeMap/urlScheme.html"/>
<meta property="og:title" content="co-ex"/>
<meta property="og:description" content="co-ex 앱에서 상대방 위치를 확인하세요."/>
<meta property="og:type" content="website">
<script>
// Legacy
// var windowLocation = string.format('{0}://{1}?scene={2}&name={3}&categoryMain={4}&categorySub={5}',
// scheme,hostname,scene,name,categoryMain,categorySub);
// var windowLocation = `${scheme}://${host}?scene=${scene}&name=${name}&categoryMain=${categoryMain}&categorySub=${categorySub}`
// Input URL Format
// window.location == "https://exgs.github.io/yunsleeMap/urlScheme.html?parameter={0},{1},{2}",
var temp = "?parameter=";
var a = window.location.search.substr(temp.length).split(',');
var name = a[0];
var categoryMain = a[1];
var categorySub = a[2];
var scheme = 'maxst';
var host = 'vpssdk';
var windowLocation = `${scheme}://${host}?${name},${categoryMain},${categorySub}`
console.log(windowLocation);
window.location = windowLocation;
// var redirectToApp = function(windowLocation) {
// document.location = windowLocation;
// };
// window.onload = redirectToApp;
var setValueHref = function()
{
document.getElementById("urlScheme").setAttribute("href", windowLocation);
}
window.onload = setValueHref;
/* query(&) 기반 파라미터 분할
function getQueryStringObject() {
var a = window.location.search.substr(1).split('&');
if (a == "") return {};
var b = {};
for (var i = 0; i < a.length; ++i)
{
var p = a[i].split('=', 2);
if (p.length == 1)
b[p[0]] = "";
else
b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " "));
}
return b;
}
*/
</script>
</head>
<body>
<h1>
<a id="urlScheme" href="#">
상대방의 위치를 확인하시겠습니까?
</a>
</h1>
</body>
</html>