-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
122 lines (114 loc) · 6.11 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
117
118
119
120
121
122
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./tutice.svg" />
<link rel="apple-touch-icon" href="/tutice.png" />
<link rel="shortcut icon" href="/tutice.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="#ffffff" />
<meta name="description" content="과외 관리의 새로운 표준 Tutice를 경험해보세요" />
<meta property="og:title" content="Tutice: 쉬운 수업 관리로 열리는 정확한 나의 결실" />
<meta property="og:description" content="과외 관리의 새로운 표준 Tutice를 경험해보세요" />
<meta property="og:image" content="/og_img.png" />
<meta property="og:url" content="https://www.tutice.com" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Tutice: 쉬운 수업 관리로 열리는 정확한 나의 결실" />
<meta name="twitter:description" content="과외 관리의 새로운 표준 Tutice를 경험해보세요" />
<meta name="twitter:image" content="/og_img.png" />
<!-- <link rel="/manifest" href="js13kpwa.webmanifest" /> -->
<link rel="manifest" href="manifest.json" />
<link rel="stylesheet" as="style" crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.css" />
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
<script type="text/javascript" src="https://static.nid.naver.com/js/naveridlogin_js_sdk_2.0.2.js"
charSet="utf-8"></script>
<script type="text/javascript" charset="UTF-8">
var inappdeny_exec_vanillajs = (callback) => {
if (document.readyState != "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
};
inappdeny_exec_vanillajs(() => {
/* Do things after DOM has fully loaded */
function copytoclipboard(val) {
var t = document.createElement("textarea");
document.body.appendChild(t);
t.value = val;
t.select();
document.execCommand("copy");
document.body.removeChild(t);
}
function inappbrowserout() {
copytoclipboard(window.location.href);
alert(
'URL주소가 복사되었습니다.\n\nSafari가 열리면 주소창을 길게 터치한 뒤, "붙여놓기 및 이동"를 누르면 정상적으로 이용하실 수 있습니다.',
);
location.href = "x-web-search://?";
}
var useragt = navigator.userAgent.toLowerCase();
var target_url = location.href;
if (useragt.match(/kakaotalk/i)) {
//카카오톡 외부브라우저로 호출
location.href = "kakaotalk://web/openExternal?url=" + encodeURIComponent(target_url);
} else if (useragt.match(/line/i)) {
//라인 외부브라우저로 호출
if (target_url.indexOf("?") !== -1) {
location.href = target_url + "&openExternalBrowser=1";
} else {
location.href = target_url + "?openExternalBrowser=1";
}
} else if (
useragt.match(
/inapp|naver|snapchat|wirtschaftswoche|thunderbird|instagram|everytimeapp|whatsApp|electron|wadiz|aliapp|zumapp|iphone(.*)whale|android(.*)whale|kakaostory|band|twitter|DaumApps|DaumDevice\/mobile|FB_IAB|FB4A|FBAN|FBIOS|FBSS|SamsungBrowser\/[^1]/i,
)
) {
//그외 다른 인앱들
if (useragt.match(/iphone|ipad|ipod/i)) {
//아이폰은 강제로 사파리를 실행할 수 없다 ㅠㅠ
//모바일대응뷰포트강제설정
var mobile = document.createElement("meta");
mobile.name = "viewport";
mobile.content = "width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, minimal-ui";
document.getElementsByTagName("head")[0].appendChild(mobile);
//노토산스폰트강제설정
var fonts = document.createElement("link");
fonts.href =
"https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap";
document.getElementsByTagName("head")[0].appendChild(fonts);
document.body.innerHTML =
"<style>body{margin:0;padding:0;font-family: 'Noto Sans KR', sans-serif;overflow: hidden;height: 100%;}</style><h2 style='padding-top:50px; text-align:center;font-family: 'Noto Sans KR', sans-serif;'>인앱브라우저 호환문제로 인해<br />Safari로 접속해야합니다.</h2><article style='text-align:center; font-size:17px; word-break:keep-all;color:#999;'>아래 버튼을 눌러 Safari를 실행해주세요<br />Safari가 열리면, 주소창을 길게 터치한 뒤,<br />'붙여놓기 및 이동'을 누르면<br />정상적으로 이용할 수 있습니다.<br /><br /><button onclick='inappbrowserout();' style='min-width:180px;margin-top:10px;height:54px;font-weight: 700;background-color:#31408E;color:#fff;border-radius: 4px;font-size:17px;border:0;'>Safari로 열기</button></article><img style='width:70%;margin:50px 15% 0 15%' src='https://tistory3.daumcdn.net/tistory/1893869/skin/images/inappbrowserout.jpeg' />";
} else {
//안드로이드는 Chrome이 설치되어있음으로 강제로 스킴실행한다.
location.href =
"intent://" +
target_url.replace(/https?:\/\//i, "") +
"#Intent;scheme=http;package=com.android.chrome;end";
}
}
});
// 서비스 워커 등록
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker
.register("firebase-messaging-sw.js")
.then(function (registration) {
console.log("Service Worker 등록 성공:", registration);
})
.catch(function (error) {
console.log("Service Worker 등록 실패:", error);
});
});
}
</script>
<title>Tutice</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>