PageSourceSearch

https://d-j.co.kr/ind-script/optimizer_user.php?filename=jY1BDsIwD…8681f22df3d95045a0d9999&t=1768806162&user=T

js d-j.co.kr collected 2026-10-06 14:04:08 UTC 18,711 bytes, 492 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2    const flag1 = document.querySelector('.custom_option4_css td span');
3    const flag2 = document.querySelector('.custom_option5_css td span');
4    const nameTarget = document.querySelector('.name');
5
6    if (nameTarget) {
7        const combinedContainer = document.createElement('div');
8        combinedContainer.className = 'combined_flag_area';
9        combinedContainer.style.marginTop = '0px';
10
11        let htmlContent = '';
12        if (flag1) htmlContent += flag1.innerHTML;
13        if (flag2) htmlContent += flag2.innerHTML;
14
15        combinedContainer.innerHTML = htmlContent;
16        nameTarget.after(combinedContainer);
17
18        const row1 = document.querySelector('.custom_option4_css');
19        const row2 = document.querySelector('.custom_option5_css');
20        if (row1) row1.style.display = 'none';
21        if (row2) row2.style.display = 'none';
22    }
23});
24
25$(document).ready(function(){
26        var optionValue = $('.custom_option9_css td span').text().trim();
27        if(optionValue !== "") {
28            $('#span_product_price_text').addClass('add_name');
29            console.log("세팅형 가격이 존재하여 클래스가 추가되었습니다.");
30        }
31    });
32$(document).ready(function() {
33
34// 1. 실제 로직을 수행하는 함수 정의
35function checkAndAddClass() {
36    $('.spec').each(function(){
37        var $spec = $(this);
38        
39        // 이미 처리된 항목은 건너뛰기 (중복 실행 방지)
40        if($spec.data('processed')) return;
41
42        var $optionP = $spec.find('.custom_option9 p');
43        
44        // p 태그가 존재하고 텍스트가 있을 때만 실행
45        if ($optionP.length > 0) {
46            var text = $.trim($optionP.text());
47
48            // 숫자(0-9)가 하나라도 포함되어 있는지 정규식 체크
49            if (/\d/.test(text)) {
50                $spec.find('.price_copy').addClass('option_add');
51            }
52        }
53        
54        // 처리 완료 표시
55        $spec.data('processed', true);
56    });
57}
58
59// 2. 최초 페이지 로드 시 1회 실행
60checkAndAddClass();
61
62// 3. MutationObserver로 동적 로딩(더보기, 페이지 이동 등) 감지
63var observer = new MutationObserver(function(mutations) {
64    // 변화가 감지되면 로직 재실행
65    checkAndAddClass();
66});
67
68// body 태그 내의 변화를 감시 (상품 목록이 body 어딘가에 추가되므로)
69observer.observe(document.body, {
70    childList: true,
71    subtree: true
72});
73});
74
75document.addEventListener("DOMContentLoaded", function() {
76  var maxCheck = 50; 
77  var checkCount = 0;
78
79  var adminTimer = setInterval(function() {
80    checkCount++;
81
82    var wrapper = document.querySelector('.dj__admin_check');
83    var nameEl = wrapper ? wrapper.querySelector('.xans-member-var-name') : null;
84
85    if (nameEl && nameEl.textContent.trim() !== "") {
86      
87      var userName = nameEl.textContent.trim();
88      
89      if (userName.includes('관리자')) {
90        console.log("관리자 확인됨! (" + userName + ")");
91
92        var adminElements = document.querySelectorAll('.admin-only');
93        adminElements.forEach(function(el) {
94          el.style.display = 'block'; 
95          el.style.setProperty('display', 'block', 'important'); 
96        });
97      }
98
99      clearInterval(adminTimer);
100    }
101
102    if (checkCount >= maxCheck) {
103      clearInterval(adminTimer);
104    }
105
106  }, 100);
107});
108
109
110
111
112
113
114
115
116document.querySelectorAll('p').forEach(p => {
117  if (p.innerHTML.trim() === '<br>') {
118    p.style.setProperty('line-height', '1', 'important');
119  }
120});
121
122
123$(document).ready(function() {
124    // 아이프레임을 선택
125    var iframe = $('iframe')[0]; // 첫 번째 iframe을 선택, 여러 개일 경우 [index]로 지정 가능
126
127    // 아이프레임 문서에 접근
128    var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
129
130    // 스타일 태그 추가
131    var style = iframeDocument.createElement('style');
132    style.innerHTML = 'body, body * { font-size: 14px !important; }';
133
134    // 아이프레임의 <head>에 스타일을 추가
135    iframeDocument.head.appendChild(style);
136});
137
138
139
140
141/**
142 * 움직이는 배너 Jquery Plug-in
143 * @author  cafe24
144 */
145
146(function($){
147
148    $.fn.floatBanner = function(options) {
149        options = $.extend({}, $.fn.floatBanner.defaults , options);
150        
151        return this.each(function() {
152            var aPosition = $(this).position();
153            var jbOffset = $(this).offset();
154            var node = this;
155            
156            $(window).scroll(function() {
157                var _top = $(document).scrollTop();
158                _top = (aPosition.top < _top) ? _top : aPosition.top;
159
160                setTimeout(function () {
161                    var newinit = $(document).scrollTop();
162
163                    if ( newinit >
163 jbOffset.top ) {
164                        _top -= jbOffset.top; 
165                        var container_height = $("#wrap").height();
166                        var quick_height = $(node).height();
167                        var cul = container_height - quick_height;
168                        if(_top > cul){
169                            _top = cul;
170                        }
171                    }else {
172                        _top = 0;
173                    }
174                    
175                    $(node).stop().animate({top: _top}, options.animate);
176                }, options.delay);
177            });
178        });
179    };
180
181    $.fn.floatBanner.defaults = { 
182        'animate'  : 500,
183        'delay'    : 500
184    };
185
186})(jQuery);
187
188/**
189 * 문서 구동후 시작
190 */
191$(document).ready(function(){
192    $('#banner:visible, #quick:visible').floatBanner();
193
194    //placeholder
195    $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){
196        var placeholderName = $(this).parents().attr('title');
197        $(this).attr("placeholder", placeholderName);
198    });
199    /* placeholder ie8, ie9 */
200    $.fn.extend({
201        placeholder : function() {
202            //IE 8 버전에는 hasPlaceholderSupport() 값이 false를 리턴
203           if (hasPlaceholderSupport() === true) {
204                return this;
205            }
206            //hasPlaceholderSupport() 값이 false 일 경우 아래 코드를 실행
207            return this.each(function(){
208                var findThis = $(this);
209                var sPlaceholder = findThis.attr('placeholder');
210                if ( ! sPlaceholder) {
211                   return;
212                }
213                findThis.wrap('<label class="ePlaceholder" />');
214                var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : '';
215                findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>');
216                this.onpropertychange = function(e){
217                    e = event || e;
218                    if (e.propertyName == 'value') {
219                        $(this).trigger('focusout');
220                    }
221                };
222                //공통 class
223                var agent = navigator.userAgent.toLowerCase();
224                if (agent.indexOf("msie") != -1) {
225                    $(".ePlaceholder").css({"position":"relative"});
226                    $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 
227                    $(".ePlaceholder label").css({"padding":"0"});
228                }  
229            });
230        }
231    });
232     
233    $(':input[placeholder]').placeholder(); //placeholder() 함수를 호출
234     
235    //클릭하면 placeholder 숨김
236    $('body').delegate('.ePlaceholder span', 'click', function(){
237        $(this).hide();
238    });
239     
240    //input창 포커스 인 일때 placeholder 숨김
241    $('body').delegate('.ePlaceholder :input', 'focusin', function(){
242        $(this).prev('span').hide();
243    });
244     
245    //input창 포커스 아웃 일때 value 가 true 이면 숨김, false 이면 보여짐
246    $('body').delegate('.ePlaceholder :input', 'focusout', function(){
247        if (this.value) {
248            $(this).prev('span').hide();
249        } else {
250            $(this).prev('span').show();
251        }
252    });
253     
254    //input에 placeholder가 지원이 되면 true를 안되면 false를 리턴값으로 던져줌
255    function hasPlaceholderSupport() {
256        if ('placeholder' in document.createElement('input')) {
257            return true;
258        } else {
259            return false;
260        }
261    }
262});
263
264/**
265 *  썸네일 이미지 엑박일경우 기본값 설정
266 */
267$(window).load(function() {
268    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
269        var $img = new Image();
270        $img.onerror = function () {
271                $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
272        }
273        $img.src = this.src;
274    });
275});
276
277
278
279/* 메뉴 고정 */
280
281   $(document).ready(function(){
282	   $(window).bind('scroll', function() {
283	   var djHeight = $( window ).height() - 5;
284			 if ($(window).scrollTop() > 50) {
285				 $('#header .top_3').addClass('top_3_fixed');
286			 }
287			 else {
288				 $('#header .top_3').removeClass('top_3_fixed');
289			 }
290		});
291	});
292
293
294
295   $(document).ready(function(){
296	   $(window).bind('scroll', function() {
297	   var djHeight = $( window ).height() - 5;
298			 if ($(window).scrollTop() > 50) {
299				 $('.xans-product-detail .infoArea').addClass('infoArea_fixed');
300			 }
301			 else {
302				 $('.xans-product-detail .infoArea').removeClass('infoArea_fixed');
303			 }
304		});
305	});
306
307
308
309/**
310 *  썸네일 이미지 엑박일경우 기본값 설정
311 */
312$(window).load(function() {
313    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
314        var $img = new Image();
315        $img.onerror = function () {
316                $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
317        }
318        $img.src = this.src;
319    });
320});
321
322
323
324
325//window popup script
326function winPop(url) {
327    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
328}
329/**
330 * document.location.href split
331 * return array Param
332 */
333function getQueryString(sKey)
334{
335    var sQueryString = document.location.search.substring(1);
336    var aParam       = {};
337
338    if (sQueryString) {
339        var aFields = sQueryString.split("&");
340        var aField  = [];
341        for (var i=0; i<aFields.length; i++) {
342            aField = aFields[i].split('=');
343            aParam[aField[0]] = aField[1];
344        }
345    }
346
347    aParam.page = aParam.page ? aParam.page : 1;
348    return sKey ? aParam[sKey] : aParam;
349};
350
351$(document).ready(function(){
352    // tab
353    $.eTab = function(ul){
354        $(ul).find('a').click(function(){
355            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
356                _target = $(this).attr('href'),
357                _siblings = '.' + $(_target).attr('class');
358            $(_target).show().siblings(_siblings).hide();
359            return false
360        });
361    }
362    if ( window.call_eTab ) {
363        call_eTab();
364    };
365});
366(function($){
367$.fn.extend({
368    center: function() {
369        this.each(function() {
370            var
371                $this = $(this),
372                $w = $(window);
373            $this.css({
374                position: "absolute",
375                top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
376                left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
377            });
378        });
379        return this;
380    }
381});
382$(function() {
383    var $container = function(){/*
384<div id="modalContainer">
385    <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
386</div>');
387*/}.toString().slice(14,-3);
388    $('body')
389    .append($('<div id="modalBackpanel"></div>'))
390    .append($($container));
391    function closeModal () {
392        $('#modalContainer').hide();
393        $('#modalBackpanel').hide();
394    }
395    $('#modalBackpanel').click(closeModal);
396    zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
397        var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
398        $('#modalContent').attr('src', $url);
399        $('#modalContent').bind("load",function(){
400            $(".header .close",this.contentWindow.document.body).bind("click", closeModal);
401        });
402        $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
403        $('#modalContainer').center().show();
404    }
405});
406})(jQuery);
407$(document).ready(function(){
408    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
409        var sShippingCountryCode4Cookie = 'shippingCountryCode';
410        var bShippingCountryProc = false;
411
412        // 배송국가 선택 설정이 사용안함이면 숨김
413        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
414            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
415            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide();
416        } else {
417            $('.thumb .xans-layout-multishoplistitem').hide();
418            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
419            if (typeof(aShippingCountryCode) != 'undefined' && aS
419hippingCountryCode != null && aShippingCountryCode.length > 2) {
420                var sShippingCountryValue = aShippingCountryCode[2];
421            }
422
423            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
424            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
425
426            if (aHrefCountryValue.length == 2) {
427                var sShippingCountryValue = aHrefCountryValue[1];
428            }
429
430            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
431            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
432                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
433
434                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
435                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
436                }
437            }
438            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
439                sShippingCountryValue = sShippingCountryValue.split("#")[0];
440                var bShippingCountryProc = true;
441
442                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
443                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
444                var expires = new Date();
445                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
446                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
447                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
448                    $("#f_country").val(sShippingCountryValue).change();;
449                }
450            }
451        }
452        // 언어선택 설정이 사용안함이면 숨김
453        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
454            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
455            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide();
456        } else {
457            $('.thumb .xans-layout-multishoplistitem').hide();
458        }
459
460        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
461        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
462            $(".xans-layout-multishopshipping").hide();
463            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide();
464        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
465            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
466            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
467            $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
468            // 배송국가 선택을 사용해야 레이어를 보이게 함
469            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
470                $(".xans-layout-multishopshipping").show();
471            }
472        }
473
474        $(".xans-layout-multishopshipping .close").bind("click", function() {
475            $(".xans-layout-multishopshipping").hide();
476        });
477
478        $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() {
479            var expires = new Date();
480            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
481            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
482
483            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
483을 넘김
484            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
485
486            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
487        });
488        $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() {
489            $(".xans-layout-multishopshipping").show();
490        });
491    }
492});

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.