PageSourceSearch

http://kyungsung.ac.kr/resources/_Js/common.simple.js?1790967421769

js kyungsung.ac.kr collected 2026-10-02 18:57:20 UTC 8,906 bytes, 260 lines download raw bytes

1/* https://jscompress.com/ */
2var console = window.console || { log: function() {} };
3var browser = (function() {
4	var userAgent = navigator.userAgent, s = userAgent.toLowerCase();
5	var match = /(webkit)[ \/](\w.]+)/.exec(s) || 		  /(opera)(?:.*version)?[ \/](\w.]+)/.exec(s) || 		  /(msie) ([\w.]+)/.exec(s) ||                		  /(mozilla)(?:.*? rv:([\w.]+))?/.exec(s) ||		 [];
6	function matchMediaQuery(query) {		return "matchMedia" in window ? matchMedia(query).matches : false; 	}
7	opera = window.opera && window.opera.buildNumber;	android = /Android/.test(userAgent);	webkit = /WebKit/.test(userAgent);
8	ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(navigator.appName);
9	ie = ie && /MSIE (\w+)\./.exec(userAgent)[1];
10	ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || navigator.appName.indexOf('Netscape') != -1) ? 11 : false;
11	ie12 = (userAgent.indexOf('Edge/') != -1 && !ie && !ie11) ? 12 : false;
12	ie = ie || ie11 || ie12;
13	gecko = !webkit && !ie11 && /Gecko/.test(userAgent);
14	mac = userAgent.indexOf('Mac') != -1;
15	iDevice = /(iPad|iPhone)/.test(userAgent);
16	fileApi = "FormData" in window && "FileReader" in window && "URL" in window && !!URL.createObjectURL;
17	phone = matchMediaQuery("only screen and (max-device-width: 480px)") && (android || iDevice);
18	tablet = matchMediaQuery("only screen and (min-width: 800px)") && (android || iDevice);
19	windowsPhone = userAgent.indexOf('Windows Phone') != -1;
20	if (ie12) {		webkit = false;	}
21
22	return { name: match[1] || "", version: match[2] || "0" , 
23		opera: opera,	webkit: webkit,		ie: ie,		gecko: gecko,		mac: mac,		iOS: iDevice,		android: android ,
24		documentMode: ie && !ie12 ? (document.documentMode || 7) : 10, fileApi: fileApi, desktop: !phone && !tablet,	windowsPhone: windowsPhone
25	};
26}());
27
28Object.create = function (o) {    function F() {}    F.prototype = o;    return new F(); }
29
30function isMobile(){
31	var mobileKeyWords = new Array('Android', 'iPhone', 'iPod', 'BlackBerry', 'Windows CE', 'SAMSUNG', 'LG', 'MOT', 'SonyEricsson');
32	for (var info in mobileKeyWords) {
33		if (navigator.userAgent.match(mobileKeyWords[info]) != null) {
34			return true;
35		}
36	}
37	return false;
38}
39var latestFocus = null;var fcsChk = true;
40function callLatestFocus(){	latestFocus =(event.srcElement.tagName=="A" || event.srcElement.tagName=="BUTTON" )? $(event.srcElement) : $($(event.srcElement).parents("a,button").get(0)) ;  }
41
42var _userAgent_ = navigator.userAgent;var isIe6 = (/msie 6/i).test(_userAgent_);var isIe7 = (/msie 7/i).test(_userAgent_);var isIe9 = (/msie 9/i).test(_userAgent_); var isComptMode = (/compatible/i).test(_userAgent_);
43
44var docChkTimer = null;var DOC_COMPLET = null;
45function docLoading(loadFunc){
46	clearTimeout(docChkTimer);
47	if(document.readyState=="loaded" || document.readyState=="complete"){
48		DOC_COMPLET = true;
49		if(loadFunc!=undefined) loadFunc();
50	}
51	else{
52		docChkTimer = setTimeout(function(){docLoading(loadFunc);},500);
53	}
54}
55
56////낮은 브라우저 사이즈 계산오류 보정
57function lowReloadCheck(func,load_obj){
58	clearTimeout(load_obj.Timer);
59	if(!_isLowBr_) return  true;
60	try{
61		if(_isLowBr_ && load_obj.cnt < load_obj.limit){
62			if($("body").width() > wsize.win.w){
63				load_obj.cnt++;
64				load_obj.Timer = setTimeout(func,250);
65
66				return false;
67			}else{
68				load_obj.cnt = 0;
69				return true;
70			}
71		}
72		if(load_obj.cnt== load_obj.limit) {
73			load_obj.cnt = 0;
74		}
75		return true;
76	}catch(e){
77	}
78
79	return true;
80
81}
82
83
84
85
86
87//이메일 주소 선택
88function email_domain(email_domain,value){
89	var f_obj = document.getElementById(email_domain);
90	f_obj.value=value;
91	if(value=="") f_obj.style.display="";
92	else f_obj.style.display="none";
93}
94
95
96
97function add_option(obj,t_name,t_value){
98	var idx = obj.length;
99	obj.length= idx + 1;
100
101	obj.options[idx].text = t_name;
102	obj.options[idx].value= t_value;
103}
104
105
106
107
108function getBrowsertInfo(){
109	var $agent = navigator.userAgent;
110	var $s = "";
111	var $br = {browser:"",browserType:"",browserVer:[]};
112
113		
114    if ((/msie 5.0[0-9]*/i).test($agent))         { $s = "MSIE 5.0"; }
115    else if((/msie 5.5[0-9]*/i).test($agent))     { $s = "MSIE 5.5"; }
116    else if((/msie 6.0[0-9]*/i).test($agent))     { $s = "MSIE 6.0"; }
117    else if((/msie 7.0[0-9]*/i).test($agent))     { $s = "MSIE 7.0"; }
118    else if((/msie 8.0[0-9]*/i).test($agent))     { $s = "MSIE 8.0"; }
119    else if((/msie 9.0[0-9]*/i).test($agent))     { $s = "MSIE 9.0"; }
120	else if((/msie 10.0[0-9]*/i).test($agent))     { $s = "MSIE 10.0"; }
121	else if((/windows*/i).test($agent) && (/rv:11.0[0-9]*/i).test($agent))     { $s = "MSIE 11.0"; }
122    else if((/msie 4.[0-9]*/i).test($agent))      { $s = "MSIE 4.x"; }
123    else if((/firefox/i).test($agent))            { $s = "FireFox"; }
124    else if((/safari/i).test($agent))            { $s = "FireFox"; }
125    else if((/x11/i).test($agent))                { $s = "Netscape"; }
126    else if((/opera/i).test($agent))              { $s = "Opera"; }
127    else if((/gec/i).test($agent))                { $s = "Gecko"; }
128    else if((/bot|slurp/i).test($agent))          { $s = "Robot"; }
129    else if((/internet explorer/i).test($agent))  { $s = "IE"; }
130    else if((/mozilla/i).test($agent))            { $s = "Mozilla"; }
131    else { $s = ""; }
132
133	$br.browser = $s;
134
135	if((/msie/i).test($s)){
136		$br.browserType = "IE";
137		$br.browserVer =  $s.replace("MSIE " ,"").split(".");
138	}
139	
140	return $br;
141
142}
143
144
145var $wbr =getBrowsertInfo();
146var wsize = null;	//윈도우 사이즈 정보
147var psize = null;	//컨텐츠 사이즈 정보
148var lowIeChk = {	old_w:0,old_h:0 }
149function getWindowSizeObj(){
150		var sizeObj = {
151		scr : {w:screen.width,h:screen.height},
152		availscr : {w:screen.availWidth,h:screen.availHeight},
153		win : (_isLowBr_)? {w:$(window).width(),h:$(window).height()}	: {w:window.innerWidth,h:window.innerHeight}	//스크롤사이즈 제외(윈도우 8부터 아래버전에서 확인안됨.ㅠㅠ)
154		
155	}
156	return sizeObj;
157}
158function getPageSizeObj(){
159	var sizeObj = {
160		doc : {w:document.documentElement.scrollWidth,h:document.documentElement.scrollHeight},
161		scroll : {x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop,top:$(window).scrollTop(),left:$(window).scrollLeft()}	////모바일에서는 안잡힘..
162		, header:{h:$("#header-wrap").height()}		, footer:{h:$("#footer-wrap").height() + 1}
163	};
164	return sizeObj;
165}
166function getWindowSize(){
167	wsize =getWindowSizeObj();
168}
169function getPageSize(){
170	psize = getPageSizeObj();
171
172	printWinSizeInfo();
173}
174
175function printWinSizeInfo(){
176	var str = "";
177//	str +="screen [w : "+wsize.scr.w+", h:"+wsize.scr.h+"]<br/>";
178//	str +="availscr [w : "+wsize.availscr.w+", h:"+wsize.availscr.h+"]<br/>";
179	str +="window [w : "+wsize.win.w+", h:"+wsize.win.h+"] ";		//스크롤바 포함한 브라우저 윈도우  높이
180	str +="doc [w : "+psize.doc.w+", h:"+psize.doc.h+"]<br/>";
181//	str +="scrollpos [w : "+psize.scroll.x+", h:"+psize.scroll.y+"]<br/>";	
182//	str +="scrollpos2 [left : "+psize.scroll.x+", top:"+psize.scroll.y+"]<br/>";	
183	$("#testBox").html("[" + $wbr.browser +"]" + str +" /" + $(".div-conts").width());
184}
185
186
187function setLowBrowser(){
188	
189	$("body").removeClass("isIE7");
190	try{
191		if($wbr.browserType=="IE" && $wbr.browserVer[0]<=8){
192			_isLowBr_ = true;
193			$("body").addClass("isIE7");
194
195			$("li").each(function(){
196				if($(this).index() ==0) $(this).addClass("is-first");
197				if($(this).index() ==($(" > li",$(this).parent()).length -1)) $(this).addClass("is-last");
198			});
199			
200			/*
201			$("a > span").each(function(){
202				if( $(this).attr("onclick")==undefined || $(this).attr("onclick")==""){
203					$(this).bind("click",function(){
204						$($(this).parents("a").get(0)).click();
205					});
206				}
207			});
208			*/
209		}
210	}catch(e){
211	}
212
213}
214
215
216  // 문자열 길이 구하기....
217function calByte(msg) {
218   var t;
219   var msgLen = 0;
220
221   for(var i = 0; i < msg.length; i++) {
222      t = msg.charAt(i);
223
224      if(escape(t).length > 4)
225         msgLen += 2;
226      else if(t != "\r")
227         msgLen++;
228   }
229
230   return msgLen;
231}
232
233
234function trim(v){	return	$.trim(v); }
235
236
237
238  function addBookmarkProgram(obj) {
239	title = $(document).attr("title");
240	url = location.href;
241	var _isMobile_ = false;
242	if ( _isMobile_ ) {
243		return true;
244	} else {
245		try {
246			window.external.AddFavorite(url,title);
247		} catch(e) {
248			alert('이 브라우저에서는 즐겨찾기 기능을 사용할 수 없습니다.\n크롬에서는 Ctrl 키와 D 키를 동시에 눌러서 즐겨찾기에 추가할 수 있습니다.');
249		}
250		return false;
251	}
252}
253  
254  function pagePrint(){
255		try{
256			window.print();
257		}catch(e){
258			alert("미지원 브라우저입니다.\n웹 브라우저의 인쇄 기능을 이용해주시기 바랍니다.");
259		}
260	}

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.