PageSourceSearch

https://rentcar.jejupass.com/js/vue-head-useragent.js

js jejupass.com collected 2026-10-01 14:14:45 UTC 6,617 bytes, 210 lines download raw bytes

1// Head : PC, Mobile 분기
2const dynamicScript = function (src, cb) {
3  // element 추가
4  const script = document.createElement("script");
5  // src 어트리뷰트에 경로 추가
6  script.src = src;
7  // 비동기식이 아닌 동기식으로 한다.
8  script.async = false;
9  // 헤더에 추가
10  document.head.appendChild(script);
11  // load가 완료되면 callback을 요청
12  window.onload = function () {
13    if (typeof cb === 'function') {
14      cb.call(this)
15    }
16  };
17}
18
19const dynamicLink = function (src) {
20  // element 추가
21  const link = document.createElement("link");
22  // href 어트리뷰트에 경로 추가
23  link.href = src;
24  // 비동기식이 아닌 동기식으로 한다.
25  link.async = false;
26  // style일의 기본 어트리뷰트 추가
27  link.rel = "stylesheet";
28  link.type = "text/css";
29  // 헤더에 추가
30  document.head.appendChild(link);
31}
32
33const dynamicMeta = function (contents) {
34  // element 추가
35  const meta = document.createElement("meta");
36  // 렌더링 규칙 추가
37  meta.content = contents;
38  // meta일의 기본 어트리뷰트 추가
39  meta.name = "viewport";
40  // 헤더에 추가
41  document.head.appendChild(meta);
42}
43
44const dynamicShortcut = function (src) {
45  // element 추가
46  const link = document.createElement("link");
47  // href 어트리뷰트에 경로 추가
48  link.href = src;
49  // meta일의 기본 어트리뷰트 추가
50  link.rel = "shortcut icon";
51  // 헤더에 추가
52  document.head.appendChild(link);
53}
54
55const dynamicIcon32 = function (src) {
56  // element 추가
57  const link = document.createElement("link");
58  // href 어트리뷰트에 경로 추가
59  link.href = src;
60  // meta일의 기본 어트리뷰트 추가
61  link.rel = "icon";
62  link.type = "image/png";
63  link.sizes = "32x32"
64  // 헤더에 추가
65  document.head.appendChild(link);
66}
67
68const dynamicIcon16 = function (src) {
69  // element 추가
70  const link = document.createElement("link");
71  // href 어트리뷰트에 경로 추가
72  link.href = src;
73  // meta일의 기본 어트리뷰트 추가
74  link.rel = "icon";
75  link.type = "image/png";
76  link.sizes = "16x16"
77  // 헤더에 추가
78  document.head.appendChild(link);
79}
80
81const dynamicIcon96 = function (src) {
82  // element 추가
83  const link = document.createElement("link");
84  // href 어트리뷰트에 경로 추가
85  link.href = src;
86  // meta일의 기본 어트리뷰트 추가
87  link.rel = "icon";
88  link.type = "image/png";
89  link.sizes = "96x96"
90  // 헤더에 추가
91  document.head.appendChild(link);
92}
93
94const dynamicIcon120 = function (src) {
95  // element 추가
96  const link = document.createElement("link");
97  // href 어트리뷰트에 경로 추가
98  link.href = src;
99  // meta일의 기본 어트리뷰트 추가
100  link.rel = "icon";
101  link.type = "image/png";
102  link.sizes = "120x120"
103  // 헤더에 추가
104  document.head.appendChild(link);
105}
106
107const dynamicIcon180 = function (src) {
108  // element 추가
109  const link = document.createElement("link");
110  // href 어트리뷰트에 경로 추가
111  link.href = src;
112  // meta일의 기본 어트리뷰트 추가
113  link.rel = "icon";
114  link.type = "image/png";
115  link.sizes = "180x180"
116  // 헤더에 추가
117  document.head.appendChild(link);
118}
119
120const dynamicIcon192 = function (src) {
121  // element 추가
122  const link = document.createElement("link");
123  // href 어트리뷰트에 경로 추가
124  link.href = src;
125  // meta일의 기본 어트리뷰트 추가
126  link.rel = "icon";
127  link.type = "image/png";
128  link.sizes = "192x192"
129  // 헤더에 추가
130  document.head.appendChild(link);
131}
132
133// Mobile
134const appleIcon120 = function (src) {
135  // element 추가
136  const link = document.createElement("link");
137  // href 어트리뷰트에 경로 추가
138  link.href = src;
139  // meta일의 기본 어트리뷰트 추가
140  link.rel = "apple-touch-icon-precomposed";
141  link.type = "image/png";
142  link.sizes = "120x120"
143  // 헤더에 추가
144  document.head.appendChild(link);
145}
146
147const appleIcon180 = function (src) {
148  // element 추가
149  const link = document.createElement("link");
150  // href 어트리뷰트에 경로 추가ㅡㅐ
151  link.href = src;
152  // meta일의 기본 어트리뷰트 추가
153  link.rel = "apple-touch-icon-precomposed";
154  link.type = "image/png";
155  link.sizes = "180x180"
156  // 헤더에 추가
157  document.head.appendChild(link);
158}
159
160const isMobile = () => {
161  const user = navigator.userAgent;
162  let isCheck = false;
163
164  if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(user)) {
165    isCheck = true;
166  }
167  return isCheck;
168}
169
170// 쿠키 읽기
171function getCookie(key){
172  key = new RegExp(key + '=([^;]*)'); // 쿠키들을 세미콘론으로 구분하는 정규표현식 정의
173  return key.test(document.cookie) ? unescape(RegExp.$1) : ''; // 인자로 받은 키에 해당하는 키가 있으면 값을 반환
174}
175
176if (isMobile()) {
177  dynamicLink("/mobile/css/m_common.css");
178  dynamicLink("/mobile/css/m_contents.css");
179  dynamicScript("/mobile/js/m_selectbox.js");
180  dynamicScript("/mobile/js/m_common.js");
181
182  dynamicMeta("width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no");
183  dynamicIcon16("/mobile/images/favicon/favicon-16x16.png?v1");
184  dynamicIcon32("/mobile/images/favicon/favicon-32x32.png?v1");
185  dynamicIcon96("/mobile/images/favicon/favicon-96x96.png?v1");
186  dynamicIcon192("/mobile/images/favicon/android-icon-192x192.png?v1");
187  appleIcon120("/mobile/images/favicon/apple-icon-120x120.png?v1");
188  appleIcon180("/mobile/images/favicon/apple-icon-180x180.png?v1");
189} else {
190  dynamicLink("/pc/css/common.css");
191  dynamicLink("/pc/css/contents.css");
192  dynamicScript("/pc/js/jquery.scrollbar.min.js");
193  dynamicScript("/pc/js/p_common.js")
194  dynamicScript("/pc/js/p_selectbox.js");
195
196  dynamicMeta("width=device-width, user-scalable=no, width=1366");
197  dynamicShortcut("https://static-www.jejupass.com/resource/PC/images/favicon/favicon.ico?v1");
198  dynamicIcon16("https://static-www.jejupass.com/resource/PC/images/favicon/favicon-16x16.png?v1");
199  dynamicIcon32("https://static-www.jejupass.com/resource/PC/images/favicon/favicon-32x32.png?v1");
200  dynamicIcon96("https://static-www.jejupass.com/resource/PC/images/favicon/favicon-96x96.png?v1");
201  dynamicIcon120("https://static-www.jejupass.com/resource/PC/images/favicon/apple-icon-120x120.png?v1");
202  dynamicIcon180("https://static-www.jejupass.com/resource/PC/images/favicon/apple-icon-180x180.png?v1");
203  dynamicIcon192("https://static-www.jejupass.com/resource/PC/images/favicon/android-icon-192x192.png?v1");
204}
205
206
207
208/*************************
209 * *   함수 적용    * *
210 *************************/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.