-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.html
93 lines (81 loc) · 2.74 KB
/
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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google-site-verification"
content="7UY7VcXR28Tpmw6m6fc6wtJJQvar71GKqGojp3HPb4Q"/>
<title>Morpheus</title>
<link rel="stylesheet" href="css/morpheus-latest.min.css">
<script>if (typeof module === 'object') {
window.module = module;
module = undefined;
}</script>
<script type="text/javascript" src="js/morpheus-external-latest.min.js"></script>
<script src="js/morpheus-latest.min.js"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script type="text/javascript"
src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs"
data-app-key="6xq3zgeoago5fhw"></script>
<script>if (window.module) module = window.module;</script>
</head>
<body>
<noscript>
<p>Please enable JavaScript</p>
</noscript>
<div id="vis" style="margin-left:8px;"></div>
<script type="text/javascript">
morpheus.Util.loadTrackingCode();
window.onerror = function () {
morpheus.DialogUtil.clear();
morpheus.FormBuilder.showInModal({
title: 'Error',
html: 'Oops, something went wrong. Please try again.',
});
};
var searchString = window.location.search;
if (searchString.length === 0) {
searchString = window.location.hash;
}
var landingPage = new morpheus.LandingPage();
landingPage.$el.prependTo($(document.body));
if (searchString.length === 0) {
landingPage.show();
} else {
searchString = searchString.substring(1);
var keyValuePairs = searchString.split('&');
var params = {};
for (var i = 0; i < keyValuePairs.length; i++) {
var pair = keyValuePairs[i].split('=');
params[pair[0]] = decodeURIComponent(pair[1]);
}
if (params.json) {
var options = JSON.parse(decodeURIComponent(params.json));
landingPage.open(options);
} else if (params.url) { // url to config
var $loading = morpheus.Util.createLoadingEl();
$loading.appendTo($('#vis'));
morpheus.Util.getText(params.url).then(function (text) {
var options = JSON.parse(text);
landingPage.open(options);
}).catch(function (err) {
console.log('Unable to get config file');
landingPage.show();
}).finally(function () {
$loading.remove();
});
} else {
landingPage.show();
}
}
</script>
<script>
if ((window.location.protocol === 'https:' || window.location.protocol === 'http:') &&
'serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
}
</script>
</body>
</html>