PageSourceSearch

https://image.yes24.com/static/common/RedirectWebSite.min.js?v=20251111_1

js yes24.com collected 2026-09-24 08:36:16 UTC 7,724 bytes, 1 lines download raw bytes

1function createRedirectState(){var h=!1,u=!1,r=!1,i=!0,o=!1,f="",e="",t="",n="",s="";return{setIsDebug:function(n){typeof n=="boolean"&&(h=n)},getIsMobileDevice:function(){var n=navigator.userAgent;return list_mobile_device.test(n)},getIsMobileApp:function(){var n=navigator.userAgent;return list_mobile_app.test(n)},getIsSearchBot:function(){var n=navigator.userAgent;return list_web_bot.test(n)||list_search_crawler.test(n)},getIsPcHost:function(){return u},getIsMobileHost:function(){return r},getIsRedirect:function(){return i},getPcHost:function(){return f},getMobileHost:function(){return e},setCurrentUrl:function(){t=location.href;s.length>0&&(t=s);t=t.replaceAll("//","/");t=t.replace(/https:\/(?!\/)/g,"https://").replace(/http:\/(?!\/)/g,"http://")},getCurrentUrl:function(){return t},setCustomCurrentUrl:function(n){typeof n=="string"&&(s=n)},getMatchRedirectUrl:function(n){return n.includes("{0}")?n.split("{0}")[0].toLowerCase().replace(/http(s*):\/\//i,"//"):n.toLowerCase().replace(/http(s*):\/\//i,"//")},getRedirectUrl:function(i=false){var h,s,c,l,d;if(n.length==0||i){var v="",y="",p="",w="";if(u||r){h=t.toLowerCase().replace(/http(s*):\/\//i,"//");this.dLog("=> matchCurrentUrl: "+h);for(s in list_redirect_url)if(c=list_redirect_url[s].pc_url,l=list_redirect_url[s].mobile_url,c.length>0&&l.length>0){var b=this.getMatchRedirectUrl(c),k=this.getMatchRedirectUrl(l),a=typeof list_redirect_param!="undefined"&&list_redirect_param[s]?list_redirect_param[s]:{},g=list_redirect_url[s].pc_param_replace||a.pc_param_replace||"",nt=list_redirect_url[s].mobile_param_replace||a.mobile_param_replace||"",tt=list_redirect_url[s].pc_param_add||a.pc_param_add||"",it=list_redirect_url[s].mobile_param_add||a.mobile_param_add||"",rt=list_redirect_url[s].pc_param_remove||a.pc_param_remove||"",ut=list_redirect_url[s].mobile_param_remove||a.mobile_param_remove||"";if(u&&h.includes(b)&&this.checkRequireLocation(c,h,b)){if(requireParam=tt,this.checkRequireParam(h,requireParam)){this.dLog("=> matchRedirectPcUrl: "+b);o=!1;v=g;y=nt;p=it;w=ut;this.updateCurrentUrl(c);this.updateRedirectUrl(e,f,l,c);break}}else if(r&&h.includes(k)&&this.checkRequireLocation(l,h,k)&&(requireParam=it,this.checkRequireParam(h,requireParam))){this.dLog("=> matchRedirectMobileUrl: "+k);o=!0;v=nt;y=g;p=tt;w=rt;this.updateCurrentUrl(l);this.updateRedirectUrl(f,e,c,l);break}}}n.length>0&&this.convertUrlParam(v,y,p,w);f.includes("event")&&(d=new URL(t),d.pathname.length>1&&!t.toLowerCase().includes("event.yes24.com/main")&&(d.search.toLowerCase().includes("eventno")||n.toLowerCase().includes("m.yes24.com/home/event")||n.length=="")&&(this.dLog("event.yes24.com 예외 동작"),n=t))}return n},checkRequireLocation:function(n,t,i){var r,e;if(n.includes("{0}"))return!0;var o=t.toLowerCase().split("?")[0].split("/"),u=i.toLowerCase().split("?")[0].split("/"),s=o.length-1,f=u.length-1;return u[f]===""&&(s--,f--),r=o[s],e=u[f],r=r.split("#")[0],this.dLog("-> checkCurrentVal: "+r),this.dLog("-> checkRedirectVal: "+e),r===e},checkRequireParam:function(n,t){var i=!1,r;return t.length==0?i=!0:(r=t.split(",").filter(n=>n).map(n=>n.toLowerCase()),r.forEach(t=>{this.dLog("-> Require param: "+t),n.includes(t)&&(i=!0,this.dLog("-> isRequire: "+i))})),i},convertUrlParam:function(t,i,r,u){var e=new URL(n),o=new URLSearchParams(e.search),s=e.origin+e.pathname,f=new URLSearchParams,h={},c=t.split(",").filter(Boolean).map(n=>n.toLowerCase()),l=i.split(",").filter(Boolean),a=r.split(",").filter(Boolean),v=new Set(u.split(",").filter(Boolean).map(n=>n.toLowerCase()));o.forEach((n,t)=>{var i=t.toLowerCase(),r;(h[i]=t,v.has(i))||(r=c.indexOf(i),r!==-1?f.append(l[r],n):f.append(t,n))});a.forEach(n=>{var[t,i]=n.split("=");t&&!f.has(t)&&f.append(t,i)});n=s+(f.toString()?"?"+f.toString():"")},updateCurrentUrl:function(n){if(n.includes("{0}")){var i=n.toLowerCase().substring(0,n.indexOf("{0}")).toLowerCase(),r=t.toLowerCase().split(i);t=r[0]+i+r[1].split("/")[0]}},updateRedirectUrl:function(i,r,u,f){if(u.substring(0,2)==="//")n="https:"+u+(new URL(t).search.length>0?"?"+new URL(t).search:"");else{u.includes("{0}
1")&&(u=u.toLowerCase().substring(0,u.indexOf("{0}")).toLowerCase());var e=f.includes("{0}")?f.split("{0}")[0].replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(e,"gi");n=t.replace(r,i).replace(o,u)}},setPcAndMobileHost:function(){var n;for(u=!1,r=!1,n=0;n<list_host_filter.length;n++){var i=list_host_filter[n][0],o=list_host_filter[n][1],h=new URL(t),s=h.origin.replace(/http(s*):\/\//i,"");if(s===i&&(u=!0),s===o&&(r=!0),redirect_state.getIsPcHost()||redirect_state.getIsMobileHost()){this.dLog("pcHost: "+i);this.dLog("mobileHost: "+o);f=i;e=o;break}}},redirectInit:function(){this.dLog("************************ RedirectWebSite <START> ************************");this.getCookie("USEPC")==null&&this.setCookie("USEPC","");this.dLog("getCookie('USEPC'): "+this.getCookie("USEPC"));this.redirectProcess();this.dLog("isPcHost: "+u);this.dLog("isMobileHost: "+r);this.dLog("isMobileDevice: "+this.getIsMobileDevice());this.dLog("isMobileApp: "+this.getIsMobileApp());this.dLog("isRedirect: "+i);this.dLog("=> redirectUrl: "+n);i&&n.length>0&&(n=this.convertRedirectUrlEncoding(n,r),this.redirectPage(!1));this.dLog("************************ RedirectWebSite <END> **************************")},redirectProcess:function(){if(n="",this.setCurrentUrl(),this.dLog("=> currentUrl: "+t),this.setPcAndMobileHost(),i=u||r,i&&(i=!this.getIsSearchBot(),!i&&this.getIsMobileApp()&&(i=!0),i&&(n=this.getRedirectUrl(),i=t!=n,i)))if(u)this.getIsMobileDevice()||this.getIsMobileApp()?this.getCookie("USEPC")=="Y"&&(i=!1):i=!1;else if(r)if(this.getIsMobileDevice()||this.getIsMobileApp())i=!1;else{var f=window.navigator.userAgent;f.includes("Macintosh")&&this.getCookie("USEPC")!="N"&&this.setCookie("USEPC","N");this.getCookie("USEPC")=="N"&&(i=!1)}(this.getIsMobileDevice()||this.getIsMobileApp())&&o&&(i=!1);this.getUrlParams().testYn!=null&&this.getUrlParams().testYn.length>0&&this.getUrlParams().testYn=="Y"&&(i=!1)},redirectPage:function(t=true){t&&this.setCurrentUrl();n=this.getRedirectUrl(t);n.length==0&&(u?n="https://"+e:r&&(n="https://"+f));this.dLog("=> redirectPage - redirectUrl: "+n);window.location.href=n},dLog:function(n){h&&console.log(n)},setCookie:function(n,t,i=1){try{var r=new Date;r.setDate(r.getDate()+i);document.cookie=n+"="+escape(t)+"; path=/;domain=.yes24.com;expires="+r.toGMTString()+";"}catch(u){console.log(u)}},getCookie:function(n){for(var i,r=document.cookie.split("; "),t=0;t<r.length;t++)if(i=r[t].split("="),n==i[0])return unescape(i[1]);return null},getUrlParams:function(){var n={};return window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(t,i,r){n[i]=r}),n},convertRedirectUrlEncoding:function(n,t){return RedirectEncodingRules.forEach(i=>{i.pattern.test(n)&&i.params.forEach(i=>{n.indexOf(i+"=")!==-1&&(n=t?this.convertParamToEucKr(n,i):this.convertParamToUtf8(n,i))})}),n},toEucKrUnicode:function(n){for(var i,r="",t=0;t<n.length;t++)i=n.charCodeAt(t),r+=i>255?"%u"+i.toString(16).toUpperCase().padStart(4,"0"):encodeURIComponent(n.charAt(t));return r},convertParamToEucKr:function(n,t){var r,i,u;try{return(r=new URL(n),i=r.searchParams.get(t),!i)?n:(u=this.toEucKrUnicode(i),n.replace(new RegExp(t+"=[^&]*"),t+"="+u))}catch{return n}},convertParamToUtf8:function(n,t){var i;try{if(i=n.match(new RegExp(t+"=([^&]*)")),!i||!i[1])return n;var r=i[1].replace(/%25/g,"%"),u=unescape(r),f=encodeURIComponent(u);return n.replace(new RegExp(t+"=[^&]*"),t+"="+f)}catch{return n}}}}const redirect_state=createRedirectState(),RedirectEncodingRules=[{pattern:/\/Help\/Faq/i,params:["faqquery"]},];(function(){redirect_state.redirectInit()})();

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.