(() => { const { EventManager, utils } = ShopbySkin; const { isMobileDevice } = utils; // 외부스크립트 등록 기능. 삭제금지 ShopbyExternalScript?.initialize({ apiOption: { platform: 'MOBILE_WEB', }, }).then(() => { EventManager.fire('QUERY_PAGE_SCRIPTS', ShopbyExternalScript?.scripts); }); EventManager.on('PAGE_LOAD_COMPLETED', ({ profile }) => { // 외부스크립트 등록 기능. 삭제금지 ShopbyExternalScript?.setGlobalObjectSb({ getPlatform: () => (isMobileDevice ? 'MOBILE_WEB' : 'PC'), profile, }); }); const searchParams = new URLSearchParams(location.search); const trackingKey = searchParams.get('trackingKey'); const channelType = searchParams.get('channelType'); const { setTrackingKey, setChannelType } = ShopbySkin.utils; setTrackingKey(trackingKey); setChannelType(channelType); // 240521 서주원 - 스크롤 시 헤더 클래스 토글 document.addEventListener('scroll', function () { var topHeaders = document.querySelectorAll('header'); if (window.scrollY > 0) { topHeaders.forEach((topHeader) => { topHeader.classList.add('scroll'); }); } else { topHeaders.forEach((topHeader) => { topHeader.classList.remove('scroll'); }); } }); })();