-
Notifications
You must be signed in to change notification settings - Fork 3
/
404.html
69 lines (64 loc) · 2.82 KB
/
404.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
<!DOCTYPE html><html><head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#1e96c8">
<meta name="apple-mobile-web-app-title" content="tgo.to">
<meta name="telegram goto" content="tgo.to">
<meta name="yandex-verification" content="9514ed2cd535e5da" />
<meta name="msapplication-TileColor" content="#1e96c8">
<meta name="theme-color" content="#1e96c8">
<title>TelegramGoTo</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111537010-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111537010-2');
</script>
<script >
;(function(l, projectPages) {
var repo = projectPages ? '/' + l.pathname.split('/')[1] : ''
/* redirect all 404 trafic to index.html */
function redirect() {
l.replace(l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + repo + '/?' +
(l.pathname ? 'p=' + l.pathname.replace(/&/g, '~and~').replace(repo, '') : '') +
(l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') +
(l.hash))
if (l.pathname.split('/')[1] == 'joinchat') {
window.location = "tg://join?invite=" + l.pathname.split('/')[2];
}
else if (l.pathname.split('/')[2] !== undefined) {
window.location = "tg://resolve?domain=" + l.pathname.split('/')[1] + '&post=' + l.pathname.split('/')[2];
}
else {
window.location = "tg://resolve?domain=" + l.pathname.slice(1);
}
setTimeout(function(){ window.location.href = "/"; }, 1000);
}
/* resolve 404 redirects into internal routes */
function resolve() {
if (l.search) {
var q = {}
l.search.slice(1).split('&').forEach(function(v) {
var a = v.split('=')
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&')
})
if (q.p !== undefined) {
window.history.replaceState(null, null,
repo + (q.p || '') +
(q.q ? ('?' + q.q) : '') +
l.hash
)
}
}
}
/* if current document is 404 page page, redirect to index.html otherwise resolve */
document.title === 'TelegramGoTo' ? redirect() : resolve()
}(window.location, window.projectPages || false ))</script>
</head><body>
</body></html>