-
Notifications
You must be signed in to change notification settings - Fork 770
/
index.html
48 lines (44 loc) · 1.65 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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<title>PPP</title>
<link rel="manifest" href="manifest.json" />
<link rel="icon" href="static/icons/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="static/icons/apple-touch-icon.png" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="application-name" content="PPP Terminal" />
<meta name="apple-mobile-web-app-title" content="PPP" />
<meta name="msapplication-TileColor" content="#131722" />
<meta name="theme-color" content="#131722" />
<meta name="msapplication-navbutton-color" content="#131722" />
<meta name="msapplication-starturl" content="/" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
</head>
<script>
let appType = 'mobile';
const params = Object.fromEntries(
new URLSearchParams(window.location.search).entries()
);
if (!/mobile/i.test(navigator.userAgent)) appType = 'desktop';
const lastVisitedUrl =
localStorage.getItem('ppp-last-visited-url') ?? '?page=cloud-services';
if (window.location.origin.endsWith('github.io'))
window.location.replace(
window.location.origin + `/ppp/${appType}${lastVisitedUrl}`
);
else if (/(vercel)/gi.test(window.location.origin))
window.location.replace(
window.location.origin + `/${appType}.html${lastVisitedUrl}`
);
else
window.location.replace(
window.location.origin + `/${appType}${lastVisitedUrl}`
);
</script>
<body></body>
</html>