-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathvp_embed.htm
More file actions
67 lines (60 loc) · 1.26 KB
/
vp_embed.htm
File metadata and controls
67 lines (60 loc) · 1.26 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>
<meta charset="utf-8">
<link rel="stylesheet" href="vip.css" type="text/css"/>
<script src="vp_config.js" type='text/javascript'></script>
<script src="vip_unauth.js" type='text/javascript'></script>
<script src="vip_lib.js" type='text/javascript'></script>
<style>
body {
font-family: Arial;
margin: 0;
}
#grid {
width: 100vw;
height: 100vh;
min-width: 600px;
min-height: 400px;
}
</style>
</head>
<body>
<div id="grid"></div>
</body>
<script>
var vg = new VipGrid("grid");
var gCal = new UnAuthCal();
var options = decodeURIComponent(window.location.search.substr(1)).split('&');
var last_cal_id = null;
for (var i=0; i < options.length; i++)
{
var opt = options[i].split('=');
if (opt.length < 2)
continue;
var key = opt[0];
var val = opt[1];
if (key == "cal")
{
gCal.addCal(val);
last_cal_id = val;
}
else if (key == "clr")
{
if (last_cal_id)
gCal.setCalClr(last_cal_id, "#" + val);
}
else
{
var property_val = val.replace(/'/g, '"');
var property = JSON.parse('{\"value\":' + property_val + '}');
vg.cfg[key] = property.value;
}
}
gCal.api_key = vp_unauthAPIKey;
vg.registerEventSource(gCal);
vg.enable_links = false;
vg.init();
ga_hit("feature", "embed");
</script>
</html>