-
Notifications
You must be signed in to change notification settings - Fork 67
/
index.html
79 lines (76 loc) · 3.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="google-site-verification" content="kex8f9OaacZS2GAJ_M5UupW0x-h4X3zYj8qaPJNV2JM" />
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
}
</style>
</head>
<body>
<noscript>
<strong>We're sorry but ProtoSchool doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script>
// https://github.com/schalkneethling/dnt-helper/blob/master/js/dnt-helper.js
function _dntEnabled (dnt, userAgent) {
'use strict'
var dntStatus = dnt || navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack
var ua = userAgent || navigator.userAgent
var anomalousWinVersions = ['Windows NT 6.1', 'Windows NT 6.2', 'Windows NT 6.3']
var fxMatch = ua.match(/Firefox\/(\d+)/)
var ieRegEx = /MSIE|Trident/i
var isIE = ieRegEx.test(ua)
var platform = ua.match(/Windows.+?(?=;)/g)
if (isIE && typeof Array.prototype.indexOf !== 'function') {
return false
} else if (fxMatch && parseInt(fxMatch[1], 10) < 32) {
dntStatus = 'Unspecified'
} else if (isIE && platform && anomalousWinVersions.indexOf(platform.toString()) !== -1) {
dntStatus = 'Unspecified'
} else {
dntStatus = { '0': 'Disabled', '1': 'Enabled' }[dntStatus] || 'Unspecified'
}
return dntStatus === 'Enabled'
}
// Some default pre init
var Countly = Countly || {};
Countly.q = Countly.q || [];
const COUNTLY_KEY_PROTOSCHOOL = 'c785b6eaa9c61617e1a7db83cb437e5f3dfe4280';
const COUNTLY_KEY_PROTOSCHOOL_TEST = '50f696b92cba4fe18cf60f37349f7c757625a871';
const COUNTLY_URL = 'https://countly.proto.school';
(function(){
if (!window.Cypress && !_dntEnabled()) {
// Provide countly initialization parameters
Countly.app_key = location.hostname === 'proto.school' ? COUNTLY_KEY_PROTOSCHOOL : COUNTLY_KEY_PROTOSCHOOL_TEST;
Countly.url = COUNTLY_URL;
// Choose what to track
Countly.q.push(['track_sessions']);
Countly.q.push(['track_pageview']);
Countly.q.push(['track_clicks']);
Countly.q.push(['track_scrolls']);
Countly.q.push(['track_links']);
// Load countly script asynchronously
var cly = document.createElement('script'); cly.type = 'text/javascript';
cly.async = true;
cly.src = 'https://countly.proto.school/sdk/web/countly.min.js';
cly.onload = function(){
Countly.init()
Countly.getViewUrl = function () {
return location.pathname + location.search + location.hash;
}
};
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(cly, s);
}
})();
</script>
</body>
</html>