1function makesmpflg(smpdata){ 2 if(smpdata){ 3 //͸ú´ü¸Â 4 c_date = new Date(); 5 n = c_date.getTime() + 1000*60*60*24*365; 6 c_date.setTime(n); 7 kigen = c_date.toGMTString(); 8 userDomain = location.hostname.replace(/www\./,""); 9 10 //cookie¤Î½ñ¤½Ð¤· 11 document.cookie = "smpflg="+smpdata+"; domain="+userDomain+"; path=/; expires=" + kigen; } 12} 13 14function loadCookie(loadValue){ 15 if(loadValue){ 16 var c_data = document.cookie + ";"; 17 c_data = unescape(c_data); 18 var n_point = c_data.indexOf(loadValue); 19 var v_point = c_data.indexOf("=",n_point) + 1; 20 var end_point = c_data.indexOf(";",n_point); 21 if(n_point > -1){ 22 c_data = c_data.substring(v_point,end_point); 23 return c_data; 24 } 25 } 26} 27 28function Split_GetParameter(ref) { 29 var requestParamsArr = new Object(); 30 const refArr = ref.split("?"); 31 if (refArr.length > 1) { 32 var refParamArr = refArr[1].split("&"); 33 if (refParamArr.length > 1) { 34 for (index = 0; index < refParamArr.length ; index++) { 35 var refParamValueArr = refParamArr[index].split(/=(.*)/); 36 var value = (refParamValueArr.length > 1) ? refParamValueArr[1] : ''; 37 if (index !== 0 && requestParamsArr[refParamValueArr[0]] !== undefined) { 38 requestParamsArr[refParamValueArr[0]].push(value); 39 requestParamsArr[refParamValueArr[0]] = requestParamsArr[refParamValueArr[0]]; 40 } else { 41 requestParamsArr[refParamValueArr[0]] = [value]; 42 } 43 } 44 } else { 45 var useRef = refArr[1]; 46 if (refParamArr.length ==1) { 47 useRef = refParamArr[0]; 48 } 49 var refParamValueArr = useRef.split(/=(.*)/); 50 requestParamsArr[refParamValueArr[0]] = (refParamValueArr.length > 1) ? refParamValueArr[1] : ''; 51 } 52 } 53 return requestParamsArr; 54} 55 56function getAllParameter(parametersArray, urlForSmartphone) {
57 Object.keys(parametersArray).forEach(function (key) { 58 if (key == '_ga' && parametersArray["_ga"].match(/^[0-9\.]/) != null) { 59 const refArray = urlForSmartphone.split("?"); 60 urlForSmartphone += ((refArray.length > 1) ? '&' : '?') + "_ga=" + parametersArray["_ga"]; 61 } else if (key.length > 0) { 62 var requestParamsValueArray = new Array(); 63 if (typeof parametersArray[key] === 'object') { 64 for (index = 0; index < parametersArray[key].length; index++) { 65 requestParamsValueArray.push(key + "=" + parametersArray[key][index]); 66 } 67 } else { 68 requestParamsValueArray.push(key + "=" + parametersArray[key]); 69 } 70 var paramURI = requestParamsValueArray.join("&"); 71 urlForSmartphone += ((urlForSmartphone.indexOf('?') > -1) ? '&' : '?') + paramURI; 72 } 73 }); 74 75 return urlForSmartphone; 76} 77 78var spsdomain = '//' + location.hostname; 79var spssmpdomain = spsdomain + '/smp/'; 80var ref = location.href; 81if (!loadCookie('iswishlist') && (!loadCookie('delflg') && (navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1) 82 || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) ) { 83 var Array_Parameters = Split_GetParameter(ref); 84 if(loadCookie('smpflg') == 1){ 85 var Url = spssmpdomain; 86 //mailmag 87 if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(mailmag)\.html/)) != null) { 88 Url += "mailmag.php"; 89 //rating_list 90 } else if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(rating_list)\.html/)) != null) { 91 Url += "rating_list.php" 92 // desc 93 } else if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/[0-9a-zA-Z\-\_]+?\.html/)) != null) { 94 var smpArray = ref.split("\/"); 95 var ItemNo = smpArray[4].split("\.html"); 96 Url += "item/" + ItemNo[0] + ".html"; 97 // group 98 } else if (ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(g{1}[0-9]+?)\/list\.html/) != null) { 99 var smpArray = ref.split("\/"); 100 var groupId = smpArray[4].match(/\d+/g); 101 Url += "list.php?type=class&group=" + groupId; 102 // category 103 } else if (ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/([0-9\-\_\/]+?)\/list\.html/) != null) { 104 var smpArray = ref.split("\/"); 105 var mcatId = smpArray[4]; 106 var scatId = smpArray[5]; 107 108 if (scatId.indexOf("?") != -1) { 109 scatId = scatId.split("?")[0]; 110 } 111 112 if (scatId != 'list.html') { 113 Url += "list.php?type=class&scat=" + scatId; 114 } else { 115 Url += "list.php?type=class&mcat=" + mcatId; 116 } 117 // secretGroup 118 } else if (ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(y[0-9]{10})\/list\.html/) != null) { 119 var smpArray = ref.split("\/"); 120 var yamiPath = smpArray[4]; 121 var yamiGroupId = yamiPath.replace(/^y0*/, ""); 122 Url += yamiPath + "/list.php?type=class&ygroup=" + yamiGroupId; 123 //BundleGroup 124 } else if (ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/b\/([0-9a-z\.\-\_:]+?)\/list\.html/) != null) { 125 var smpArray = ref.split("\/"); 126 var bundle = smpArray[5]; 127 Url += "list.php?type=class&b=" + bundle; 128 //Keyword 129 } else if (ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/keyword\/.*/)) { 130 var smpArray = ref.split("\/"); 131 var keyword = smpArray[5]; 132 133 if(keyword.indexOf("?") != -1) { 134 keyword = keyword.split("?")[0]; 135 } 136 137 Url += "list.php?type=keyword&search=" + keyword; 138 //Search 139 } else if (ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/list\.php(\?Search\=)*.*/)) { 140 var smpArray = ref.split("\/"); 141 Url += "list.php?mcat=-1&prcf=&prct=&type=search"; 142 } else if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(coordinate)\/([0-9])/)) != null) { 143 var smpArray = ref.split("\/"); 144 Url += "coordinate/" + smpArray[5]; 145 } else if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(coordinate)/)) != null) { 146 Url += "coordinate"; 147 } else if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(staff)\/([0-9])/)) != null) { 148 var smpArray = ref.split("\/"); 149 Url += "staff/" + smpArray[5]; 150 } else if ((ref.match(/^(https?):\/\/([0-9a-z\.\-:]+?)\/SHOP\/(staff)/)) != null) { 151 Url += "staff"; 152 } 153 154 Url = getAllParameter(Array_Parameters, Url); 155 Url = Url.replace(/(&Search=)/, '&search='); 156
157 document.write('<link href="' + spssmpdomain + 'css/pcsmp.css" rel="stylesheet" type="text/css">'); 158 document.write('<div class="shiny-blue"><a href="' + Url + '" onclick="makesmpflg(\'0\')">¥¹¥Þ¡¼¥È¥Õ¥©¥óÈǤϤ³¤Á¤é</a></div>'); 159 }else{ 160 makesmpflg('0'); 161 162 spssmpdomain = getAllParameter(Array_Parameters, spssmpdomain); 163 164 if(typeof pageTracker === 'object'){ 165 _gaq.push(['_trackPageview', {hitCallback: function() { 166 location.href = spssmpdomain; 167 }}]); 168 }else{ 169 location.href = spssmpdomain; 170 } 171 } 172} 173
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.