1/// <reference path="../jquery/jquery-latest.js" /> 2/// <reference path="../jquery/jquery-extend.js" /> 3 4function MobileHandler(m) { 5 var agent = navigator.userAgent; 6 7 // 모ë°ì¼ ì ê·ì 8 var mrx = /iP(?:hone|od)|Android|SAMSUNG|LG\s+[A-Z]|BlackBerry|MOT|Nokia|Windows\s+CE|Symbian|SonyEricsson|UP\.Browser|webOS/; 9 if (!mrx.test(agent)) { 10 console.log("[MOBILEH] mrx"); 11 return; 12 } 13 14 // ìì¸ ì ê·ì 15 var xrx = /Macintosh|SHW-M[13]80|MZ\d{3}|ESP_E2\d{2}/; 16 if (xrx.test(agent)) { 17 console.log("[MOBILEH] xrx"); 18 return; 19 } 20 21 const isGoogleMobileBot = agent.includes("Googlebot"); 22 if (isGoogleMobileBot) { 23 console.log("[MOBILEH] google bot"); 24 return; 25 } 26 27 var pc = location.protocol + "//" + location.host; 28 m = m || "https://m.nocutnews.co.kr"; 29 30 var mhost = new URL(m).host; 31 32 // PC보기 ì¬ë¶ 33 var from = $.url.qstr("from"); 34 var ref = document.referrer; 35 if (from === "mobile" && ref.indexOf(mhost) > -1) { 36 $.cookie.set("from", mhost); 37 console.log("[MOBILEH] from mobile 1"); 38 return; 39 } 40 from = $.cookie.get("from"); 41 if (from === mhost) { 42 console.log("[MOBILEH] from mobile 2"); 43 return; 44 } 45 46 // ìì¸ URL 47 if (location.pathname.indexOf("/news/preview") > -1) { 48 console.log("[MOBILEH] preview") 49 return; 50 } 51 if (location.pathname.indexOf("/special/vote2022") > -1) { 52 console.log("[MOBILEH] vote2022") 53 return; 54 } 55 56 var url = location.toString().replace(pc, m); 57 58 // ë©ì¸ Default2024.aspx í¨í´ ìì¸ ì²ë¦¬ 59 const regex1 = location.pathname.match(/\//g).length === 1; 60 const defaultRegex = /2024\./gi; 61 if (regex1 && defaultRegex.test(url)) url = url.replace(defaultRegex, "."); 62 63 console.log("[MOBILEH] " + url); 64 65 location = url; 66};
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.