PageSourceSearch

https://www.dhlottery.co.kr/common/gmUtil.js?v=20260209

js dhlottery.co.kr collected 2026-09-24 09:41:02 UTC 5,220 bytes, 162 lines download raw bytes

1/**
2 ----------------------------------------------------------------------------
3@ 파일명: gmUtil.js 
4@ 프로그램명: 게임 공통 javascript
5@ 작성일: 2024.10.21
6@ 작성자: 조형근
7----------------------------------------------------------------------------
8*/
9
10/**
11 * 게임 공통 유틸
12 */
13var gmUtil = {
14	
15	centerPop : function(url, pageName, width, height, scrollYN){
16		var windowW = width; 
17		var windowH = height;
18		var left = Math.ceil((window.screen.width - windowW) / 2);
19		var top = Math.ceil((window.screen.height - windowH) / 2);
20
21		return gmUtil.positionPop(url, pageName, left, top, width, height, scrollYN);
22	},
23	
24	positionPop : function(url, pageName, left, top, width, height, scrollYN){
25		var windowW = width;
26		var windowH = height;
27
28		const ua = navigator.userAgent.toLowerCase();
29		
30		if (ua.indexOf("chrome") > -1) {
31		    windowW = width;
32		    windowH = height + 2;
33		} else if (ua.indexOf("safari") > -1) {
34		    windowW = width;
35		    windowH = height + 28;
36		}
37		var new_popup = window.open(url, pageName,'left='+left+',top='+top+',width='+windowW+',height='+windowH+',scrollbars='+scrollYN, 'status=no, toolbar=no, menubar=no, location=no');
38		return new_popup;
39
40	},
41	
42	goGameClsf : function(lottoId,clsf){
43		if(!isLoggedIn){
44			ajaxUtil.sendHttpJson({}, '/saved/clearSavedRequest.do', {method: "POST", async: false,} , function(code, msg, {data}){
45				alert("로그인 후 이용이 가능합니다.");
46				location.href = "/login";
47			});
48		} else{
49			cmmUtil.getServerProperties(function(propInfo){
50				let gmUrl = propInfo.serviceElwasUrl; // 게임 도메인
51				if(cmmUtil.isMobile() && lottoId == "LO40") {
52					gmUrl = propInfo.serviceOlwasUrl;
53				}
54				if (clsf == 'PRCHS'){
55					gmUtil.gamePopUp(lottoId, gmUrl)
56				}else if (clsf == 'SMGM'){
57					gmUtil.samplePopUp(lottoId, gmUrl)
58				}			
59			});
60		}
61	},
62	
63	//게임팝업
64	gamePopUp : function(lotid, gmUrl){
65		/*
66		* 스피드키노 LD10, 메가빙고 LD11, 더블잭마이더스 LD20, 파워볼 LD14, 트레져헌터 LI22, 트리플럭 LI21 -> gamePop
67		* 캐치미 LI23 -> catchPop
68		*/
69		var type;
70		if( lotid === 'LI23' ){
71			type = 'catchPop';
72		}else{
73			type = 'gamePop';
74		}
75		
76		if(cmmUtil.isMobile()) {
77			if(lotid == "LO40") { // 로또645
78				// 모바일 기기인 경우 토,일요일 구매 제한
79				var smarPrchs = true;
80				var smarPrchsDay = "토, 일요일";
81				
82				var reqOption = {
83					 "method": "GET",
84					 "async" : false		// 동기식 조회
85				};
86				ajaxUtil.sendHttpJson({}, '/selectMobPrchsCheck.do', reqOption, function(code, msg, {data}){
87					if(data && data.result.mobPrchs == "1") {
88						smarPrchs = false;
89						smarPrchsDay = data.result.nowDay;
90					}
91				});
92
93				if(smarPrchs) {
94					location.href = gmUrl + "/olotto/game_mobile/game645.do";
95				} else {
96					$.alert(smarPrchsDay + "에는 모바일 구매가 제한됩니다.");
97				}
98			} else {
99				if(lotid == "LP72") { // 연금복권720
100					location.href = gmUrl + "/game_mobile/pension720/game.jsp";
101				} else if(lotid == "LP72R") { // 연금복권720(예약하기)
102					location.href = gmUrl + "/game_mobile/pension720/reserveGame.jsp";
103				} else if(lotid == "LD14") { // 파워볼
104					location.href = gmUrl + "/game_mobile/m_powerBall/main.jsp";
105				} else if(lotid == "LD10") { // 스피드키노
106					location.href = gmUrl + "/game_mobile/keno/game.jsp";
107				} else if(lotid == "LD11") { // 메가빙고
108					location.href = gmUrl + "/game_mobile/bingo/game.jsp";
109				} else if(lotid == "LI21") { // 트리플럭
110					location.href = gmUrl + "/game_mobile/m_tripleLuck/main.jsp";
111				} else if(lotid == "LI22") { // 트레져헌터
112					location.href = gmUrl + "/game_mobile/thunt/game.jsp";
113				} else if(lotid == "LD20") { // 더블잭마이더스
114					location.href = gmUrl + "/game_mobile/djack/game.jsp";
115				} else if(lotid == "LI23") { // 캐치미
116					location.href = gmUrl + "/game_mobile/catch/game.jsp";
117				}
118			}	
119		} else {
120			var url = gmUrl + '/game/TotalGame.jsp?LottoId='+ lotid;
121			gmUtil.centerPop(url, 'type', 1164, 793, 'no');
122		}
123	},
124	
125	// 샘플게임팝업
126	samplePopUp : function(lotid, gmUrl){		
127		var type = 'gamePop';
128		url = gmUrl+'/game_sample/TotalGame.jsp?LottoId='+ lotid;	
129		
130		gmUtil.centerPop(url, 'type', 1164, 645, 'no');
131	},
132	
133	// 미확인 게임팝업
134	notYetGamePopUp : function(lotid, orderNo, gmInfoCn){
135		if(!isLoggedIn){
136			alert("로그인 후 이용이 가능합니다.");
137			location.href = "/login";
138			return false;
139		}
140		
141		cmmUtil.getServerProperties(function(propInfo){
142			let type = 'gamePop';
143			let url = propInfo.serviceElwasUrl; // 게임 도메인
144			let params = '';
145
146			if(lotid === 'LI21'){ //트리플럭
147				params = '/game/tluck/game.jsp?req='+orderNo+'&notyet_img='+gmInfoCn;
148			}else if(lotid === 'LI22'){ //트레져헌터
149				params = '/game/thunt/game.jsp?req='+orderNo;
150			}else if(lotid === 'LD20'){ //더블잭마이더스
151				params = '/game/double2/game.jsp?req='+orderNo;
152			}else if(lotid === 'LI23'){ //캐치미
153				params = '/game/catch/game.jsp?req='+orderNo+'&selected_data='+gmInfoCn;
154			}
155			
156			if(cmmUtil.isEmpty(orderNo) == false){
157				gmUtil.centerPop(url+params, type , 900, 645, 'no');
158			}
159		});
160	}
161	
162}

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.