PageSourceSearch

https://www.happycampus.com/js/banner.js?jsVer=20260921.1

js happycampus.com collected 2026-09-24 09:09:04 UTC 6,514 bytes, 243 lines download raw bytes

1hcBanner = {
2	inter:null,
3	tempo:0,
4	distance:0,
5	topPosition:0,
6	top:0,
7	right:0,
8	appendTarget:'',
9
10	/**
11	 *
12	 * 상세 상단 배너의 창을 닫으며 쿠키값의 저장여부를 결정한다.
13	 *
14	 * @date 2013-04-24
15	 * @author
16	 *
17	 **/
18	docDetailTopLineBannerHide:function () {
19		if($('#docDetailTopLineBannerFlag').attr("checked") == 'checked'){
20			Common.setCookie("docDetailTopLineBannerFlag", docDetailBannerDate, 1);
21		}
22		$('#docDetailTopLineBanner').hide();
23	},
24
25	/**
26	 *
27	 * 스크롤따라 떠다니는 배너 영역
28	 * @author : 김세윤
29	 */
30/*
31	setFloatingBanner:function(){
32		var target = $('#floatingBanner');
33		if(target.length == 0) return false;
34
35		$("#floatingBanner").css({"top":this.top+"px","right":this.right+"px"});
36
37	},
38*/
39	/**
40	 * 신규회원 50%할인(스카이배너 클릭시) 2013.10.07~2013.10.13
41	 * 신규회원 50%할인(스카이배너 클릭시) 2013.10.25~2013.10.31
42	 */
43	saleCouponDone : function(){
44		if(Common.isGuest()){
45			location.href = '/site/login?returnUrl='+encodeURIComponent(document.location.href);
46			return false;
47		}
48		$.ajax({
49			type:'get',
50			dataType: 'json',
51			url: "/event/saleCouponDone",
52			async:false,
53			success:function(data){
54				if(data != null) {
55					switch(data.contents){
56						case 'alreadyIssue':
57							alert(data.memberId+'님께 이미 쿠폰이 발급되었습니다.\n마이페이지에서 발급받은 쿠폰을 확인 해 주세요.');
58							Common.removeLayer('saleCouponPop');
59							return false;
60							break;
61						case 'notTarget':
62							alert('안타깝게도 회원님은 이벤트 대상자가 아닙니다.\n다운로드를 이용해 주시기 바랍니다');
63							Common.removeLayer('saleCouponPop');
64							return false;
65							break;
66						default :
67							break;
68					}
69				}
70			},
71			error: function(xhr, status, error) {
72				Common.ajaxErrorProcess(xhr, status, error);
73			}
74		});
75	},
76	/**
77	 *
78	 * 스크롤따라 떠다니는 배너 영역
79	 * @author : 김세윤
80	 */
81	rollTimeout: null,
82	setFloatingBanner:function(action,where){
83		var target = $('#floatingBanner');
84		if(target.length == 0) return false;
85
86		if(where=='doc'){
87			if(hcBanner.rollTimeout !== null){
88				return false;
89			}
90
91			hcBanner.rollTimeout = setTimeout( function(){
92				var headerHeight = $('#header').height() + 2;
93				var baseTop = headerHeight + $('.d_tit_w').height() + 37;
94				if ($('#detailJobDataBox').length > 0) { // 자소서 직업 선택 폼이 있는 경우
95					baseTop += $('#detailJobDataBox').height() + 40;
96				}
97				var scrollTop = $(document).scrollTop();
98				var top = ((headerHeight > 60) ? (baseTop - scrollTop) : (headerHeight + 2));
99				$('#floatingBanner').css({'top': top + 'px', 'position': 'fixed', 'left': '50%', 'margin-left': '480px'});
100
101				hcBanner.rollTimeout = null;
102			}, 20);
103			return false;
104		}
105
106		var fixedTop = '5';
107		if(where=='search'){
108			fixedTop = '200';
109		}
110
111		var topMaxOffset=this.top;
112		var agent=Common.getUserAgent();
113		var left=($(window).width()/2)+this.leftMargin;
114		var scrollTop = $(document).scrollTop();
115
116		if(agent['browser']=='msie'){
117			switch(agent['version']){
118				case '6.0':
119				case '7.0':
120					topMaxOffset -= 30;
121					break;
122				default:
123					break;
124			}
125		}
126
127		var absoluteCss=({
128			'top': this.top,
129			'left': '102%',
130			'display': 'block',
131			'float': 'right',
132			'position': 'absolute'
133		});
134
135		var fixedCss=({
136			'top': fixedTop,
137			'left': left,
138			'display': 'block',
139			'float': 'right',
140			'position': 'fixed'
141		});
142
143		if(action=='set'){
144			$('#floatingBanner').css(absoluteCss);
145		}else{
146			if(scrollTop==0){
147				if (document.body.scrollTop == 0) scrollTop = document.documentElement.scrollTop;
148				else scrollTop = document.body.scrollTop;
149				fixedCss=({
150					'top': scrollTop+5,
151					'left': '102%',
152					'display': 'block',
153					'float': 'right',
154					'position': 'absolute'
155				});
156			}
157
158			if(scrollTop>topMaxOffset){
159				 $('#floatingBanner').css(fixedCss);
160				 $('#test1').html('1');
161			}
162			else{
163				$('#floatingBanner').css(absoluteCss);
164				$('#test1').html('2');
165
166			}
167		}
168		$('#test2').html($('#floatingBanner').offset().left);
169	},
170	/**
171	 * 자동변환 해피에디터 설문조사에 사용
172	 * @param result
173	 * @param docSeq
174	 * @param memberSeq
175	 */
176	insertHappyDocSurvey:function(result,docSeq,memberSeq){
177		var text = '';
178		if(result =='y' || result == 'n'){
179			text = '';
180		}else if(result == 'etc'){
181			text = $('#etcOpinion').val();
182		}else{
183			alert('잘못된 접근입니다.');
184			return;
185		}
186
187		$.ajax({
188			'type':'POST',
189			'url':'/doc/setHappyDocSurvey/',
190			'data': {
191				'result':result,
192				'docSeq':docSeq,
193				'memberSeq': memberSeq,
194				'contents':encodeURIComponent(text)
195			},
196			'dataType':'json',
197			success:function(json) {
198				if(json.code == -1)
199					alert(json.msg);
200				else{
201					if(json.code == 1)
202						$('#selectedOpinion').hide();
203					else
204						$('#normalOpinion').hide();
205					$('#etcOpinion').val('')
206				}
207			},
208			error:function() {alert('XHR Error!');}
209		});
210	},
211
212	alertPopup : function(contents, onclickEvent, closeBtn, targetId) {
213		var popup = $('#alertPopup');
214		if(popup.length > 0) popup.detach();
215
216		var html = '';
217		if(Common.isUrlMobileMode() && closeBtn) {
218			html += '<div id="alertPopup" class="interactive_pop" style="margin: 0px auto auto -125px; left: 50%; top: 400px; z-index: 10000;">';
219			html += '<div class="inter_inner">' + contents + '</div>';
220			html += '<div class="cBtns" style="text-align: center;">';
221			html += '<a class="p_ev_ok" style="width: 60px;" href="#" onclick="' + onclickEvent + ';return false;">확인</a>';
222			html += ' <a class="p_ev_close" href="#" style="color:#555" onclick="$(\'#alertPopup\').detach(); return false;">취소</a>';
223			html += '</div></div>';
224		} else {
225			html += '<div id="alertPopup" class="poll2015" style="width:300px;">';
226			html += '<div style="text-align: center; position: relative;">';
227			html += '<p style="margin: 10px 0px 20px; text-align: center; font-size: 14px;">';
228			html += '<b>' + contents + '</b>';
229			html += '</p></div>';
230			html += '<div class="pbtn">';
231			if(closeBtn === false) {
232				html += '<a class="btn_p_w" href="#" onclick="' + onclickEvent + ';return false;">확인</a>';
233			} else {
234				html += '<a class="btn_p_b" href="#" onclick="' + onclickEvent + ';return false;">예</a>';
235				html += ' <a class="btn_p_w" href="#" onclick="$(\'#alertPopup\').detach(); return false;">아니오</a>';
236			}
237			html += '</div></div>';
238		}
239
240		$('body').append(html);
241		Common.fixedCenter(targetId);
242	}
243};

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.