-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (44 loc) · 1.71 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
<?DOCTYPE html>
<html>
<head>
<title>Warframe calendar</title>
<link rel="stylesheet" type="text/css" href="style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136070567-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136070567-1');
</script>
</head>
<body>
<div id="wrapper">
<iframe id="container" src="about:blank" frameborder="0" scrolling="no"></iframe>
<div id="footer">
<span>
<a href="https://github.com/warframecalendar/warframecalendar.github.io"><img src="GitHub-Mark-32px.png"></a>
</span>
<span id="button-hint">Click this button to add to your Google Calendar ^</span>
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.6/jstz.min.js"></script>
<script>
var calendars = { // value is color
'[email protected]': '#333333',
'[email protected]': '#2952A3',
'[email protected]': '#125A12',
'[email protected]': '#0F4B38',
};
var url = "https://calendar.google.com/calendar/embed?title=Warframe&showTitle=0&showPrint=0&mode=WEEK&height=800&bgcolor=%23FFFFFF";
for (var cal in calendars) {
url += '&src=' + encodeURIComponent(cal);
url += '&color=' + encodeURIComponent(calendars[cal]);
}
var timezone = jstz.determine();
url += "&ctz=" + timezone.name();
console.log("Detected timezone: ", timezone.name());
document.getElementById('container').src = url;
</script>
</body>
</html>