-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (71 loc) · 2.86 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
<!DOCTYPE html>
<html>
<head>
<title>
Change Detect
</title>
<link href="http://api.cmucreatelab.org/timemachine-viewer-043c74e/css/jquery-ui/smoothness/jquery-ui.custom.css" media="screen" rel="stylesheet" type="text/css" />
<link href="http://api.cmucreatelab.org/timemachine-viewer-043c74e/css/defaultUI.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/change.css" media="screen" rel="stylesheet" type="text/css" />
<script src="js/canvasjs.min.js" type="text/javascript"></script></head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script src="http://api.cmucreatelab.org/timemachine-viewer-043c74e/js/jquery/plugins/mouse/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="http://api.cmucreatelab.org/timemachine-viewer-043c74e/timemachine-min.js" type="text/javascript"></script>
<script src="js/ThumbnailServiceAPI.js" type="text/javascript"></script>
<script src="js/TimeMachineCanvasLayer.js" type="text/javascript"></script>
<script src="js/ThumbnailTool.js" type="text/javascript"></script>
<script src="js/BoxEventHandler.js" type="text/javascript"></script>
<script src="js/ChangeDetectionTool.js" type="text/javascript"></script>
<script type="text/javascript">
var timelapse;
var url;
var hashVars = {};
function init(url) {
var viewerOptions = {
url: url,
showFullScreenBtn: false,
enableEditor: false,
enablePresentationSlider: false,
mediaType: ".mp4",
onTimeMachinePlayerReady: function(viewerDivId) {
},
disableTourLooping: true,
startEditorFromPresentationMode: true,
datasetType: "breathecam",
enableChangeDetection: true
};
timelapse = new org.gigapan.timelapse.Timelapse("timelapse", viewerOptions);
}
function unpackVars(str) {
var queryString = {};
var re = new RegExp("([^?=&]+)(=([^&]*))?", "g");
str.replace(re, function($0, $1, $2, $3) {
queryString[$1] = $3 || true;
});
return queryString;
}
function main() {
var hash = window.location.hash.slice(1);
hashVars = unpackVars(hash);
if (hashVars && hashVars.d) {
startingDate = hashVars.d;
}
if (hashVars && hashVars.url) {
url = hashVars.url;
}
if (url) {
init(url);
} else {
alert('ERROR: URL missing from hash. Please add #url={TIMEMACHINE_ROOT}');
}
}
document.addEventListener('DOMContentLoaded', main, false);
</script>
</head>
<body>
<div class="container">
<div id="timelapse"></div>
</div>
</body>
</html>