-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
116 lines (99 loc) · 4.93 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>VERBA | Wordle italiano</title>
<meta name="description" content="VERBA | Wordle in italiano. Indovina la parola in 6 tentativi.">
<!-- FB Meta Tags -->
<meta property="og:url" content="https://sebastianomorando.github.io/wordle-it/">
<meta property="og:type" content="website">
<meta property="og:title" content="VERBA | Wordle italiano - Indovina la parola">
<meta property="og:description" content="VERBA | Wordle in italiano. Indovina la parola in 6 tentativi.">
<meta property="og:image" content="https://sebastianomorando.github.io/wordle-it/verba_1200x630.png">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="sebastianomorando.github.io">
</head>
<body>
<script>
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
var nightmode = localStorage.getItem('nightmode')
if (nightmode == null) {
localStorage.setItem('nightmode', 'true')
document.body.classList.add('nightmode')
}
}
if (localStorage.getItem('nightmode') === 'true') {
document.body.classList.add('nightmode')
}
if (localStorage.getItem('colorblind') === 'true') {
document.body.classList.add('colorblind')
}
</script>
<div id="app"></div>
<div id="modal-root"></div>
<script>
var tracking_url = 'https://branzino.fabulab.com/track';
var property_id = '5fd27f02-0c07-4057-b94d-1caf99ff80be';
var client_info = {
timeOpened:new Date(),
timezone:(new Date()).getTimezoneOffset()/60,
get url() {return window.location.href},
get pageon(){return window.location.pathname},
get referrer(){return document.referrer},
get previousSites(){return history.length},
get browserName(){return navigator.appName},
get browserEngine(){return navigator.product},
get browserVersion1a(){return navigator.appVersion},
get browserVersion1b(){return navigator.userAgent},
get browserLanguage(){return navigator.language},
get browserOnline(){return navigator.onLine},
get browserPlatform(){return navigator.platform},
get javaEnabled(){return navigator.javaEnabled()},
get dataCookiesEnabled(){return navigator.cookieEnabled},
get dataCookies1(){return document.cookie},
get dataCookies2(){return decodeURIComponent(document.cookie.split(";"))},
get dataStorage(){return localStorage},
get sizeScreenW(){return screen.width},
get sizeScreenH(){return screen.height},
get sizeDocW(){return document.width},
get sizeDocH(){return document.height},
get sizeInW(){return innerWidth},
get sizeInH(){return innerHeight},
get sizeAvailW(){return screen.availWidth},
get sizeAvailH(){return screen.availHeight},
get scrColorDepth(){return screen.colorDepth},
get scrPixelDepth(){return screen.pixelDepth},
};
var session_id = null;
function track (event, _data) {
const data = _data || null;
const payload = {
event: event,
data: data,
client_info,
domain: window.location.hostname,
session: session_id,
property_id: property_id
}
const xhr = new XMLHttpRequest()
xhr.open('POST', tracking_url, true)
xhr.setRequestHeader('Content-Type', 'application/json')
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
if (!session_id) {
session_id = xhr.responseText;
}
}
}
xhr.send(JSON.stringify(payload))
}
track('pageview', {
url: window.location.href,
referrer: document.referrer
})
</script>
<script type="module" src="client/index.js"></script>
</body>
</html>