PageSourceSearch

https://s.naturum.co.jp/access.js?2016102502

js naturum.co.jp collected 2026-10-02 10:19:24 UTC 8,545 bytes, 1 lines download raw bytes

1var naLog=function(){var Cookie={};var host="s.naturum.co.jp";var naCookies={};var accessTime=Date.now();var sessionExpireMsec=18e5;Cookie.CookieAccessor=function(){var cookieArray=document.cookie.split(/\s*;\s*/);var cookiePair;for(var i=0;i<cookieArray.length;i++){cookiePair=cookieArray[i].split("=");if(cookiePair[0].match(/^__na_/)){naCookies[cookiePair[0]]=this._decodeCookieValue(cookiePair[1])}}naCookies.__na_hit_time=accessTime;naCookies.__na_hit_num=naCookies.__na_hit_num?naCookies.__na_hit_num:1;naCookies.__na_visit_num=naCookies.__na_visit_num||0;naCookies.__na_ref_url=document.referrer;naCookies.__na_user_id=naCookies.__na_user_id||""};Cookie.countUp=function(){naCookies.__na_hit_num=naCookies.__na_hit_num>=1?naCookies.__na_hit_num+1:1};Cookie.resetSession=function(){var visitId=this.getUniqueStr();var uniqueId=this.getUniqueStr();naCookies.__na_visit_time=accessTime;naCookies.__na_visit_id=visitId;naCookies.__na_unique_id=this.isValidUniqueId()?naCookies.__na_unique_id:uniqueId;naCookies.__na_visit_num=naCookie
1s.__na_visit_num>=1?naCookies.__na_visit_num+1:1;naCookies.__na_hit_num=1};Cookie.save=function(){var expire=new Date(accessTime+60*60*24*365*1e3);var domain=".naturum.co.jp";var key;var old_date=new Date;old_date.setTime(0);naCookies.__na_last_access=accessTime;for(key in naCookies){if(naCookies.hasOwnProperty(key)){document.cookie=key+"="+encodeURIComponent(naCookies[key])+";"+"expires="+old_date.toUTCString()+";"+"Secure;"}}for(key in naCookies){if(naCookies.hasOwnProperty(key)){document.cookie=key+"="+encodeURIComponent(naCookies[key])+";"+"path=/;"+"domain="+domain+";"+"expires="+expire.toUTCString()+";"+"Secure;"}}};Cookie.isSessionExpired=function(){return accessTime-naCookies.__na_last_access>sessionExpireMsec};Cookie.isFirstVisit=function(){return!(naCookies.__na_last_access&&naCookies.__na_visit_id&&naCookies.__na_hit_num)};Cookie.isValidUniqueId=function(){var regex=/^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/i;return regex.test(naCookies.__na_unique_id)};Cookie._decodeCookieValue=function(cookieValue){if(/^\d+$/.exec(cookieValue)){return Number(cookieValue)}else if(cookieValue==="undefined"||cookieValue===undefined){return""}else{return decodeURIComponent(cookieValue)}};Cookie.getUniqueStr=function(){var uuid="",i,random;for(i=0;i<32;i++){random=Math.random()*16|0;if(i==8||i==12||i==16||i==20){uuid+="-"}uuid+=(i==12?4:i==16?random&3|8:random).toString(16)}return uuid};Cookie.getCookieParamArray=function(){var queryStr=[];var key;for(key in naCookies){if(naCookies.hasOwnProperty(key)){queryStr.push(key+"="+encodeURIComponent(naCookies[key]))}}return queryStr};Cookie.getPostParamArray=function(params){var paramsArr=[];var id;for(id in params){if(params.hasOwnProperty(id)){paramsArr.push(id+"="+encodeURIComponent(params[id]))}}return paramsArr};Cookie.getBrowserParamArray=function(){var hash={__na_title:document.title,__na_url:document.URL,__na_agent:navigator.userAgent,__na_browser_code:navigator.appCodeName,__na_browser_name:navigator.appName,__na_browser_ver:navigator.appVersion,__na_browser_lang:navigator.language,__na_platform:navigator.platform,__na_screen:screen.width+"x"+screen.height};var key;var params=[];for(key in hash){if(hash.hasOwnProperty(key)){params.push(key+"="+encodeURIComponent(hash[key]))}}return params};Cookie.Send=function(){try{var protocol="https:"===document.location.protocol?"https://":"http://";this.CookieAccessor();this.countUp();if(this.isFirstVisit()||this.isSessionExpired()||!this.isValidUniqueId()){this.resetSession()}this.save();var cookieParam=this.getCookieParamArray();var browserParam=this.getBrowserParamArray();var img=document.createElement("img");img.src=protocol+host+"/beacon.gif?"+cookieParam.join("&")+"&"+browserParam.join("&");img.type="image/gif";img.async=true;img.style.display="none";document.getElementsByTagName("head")[0].appendChild(img)}catch(e){consoleError(e)}};Cookie.GetKeyValue=function(key){var element;var keyValue;element=document.getElementById(key);if(element!==null&&element!==""){if(element.value){keyValue=element.value}else if(element.innerHTML){keyValue=element.innerHTML.trim()}}return keyValue};Cookie.GetXMLHttpRequest=function(){var Result;if(window.XMLHttpRequest){try{Result=new XMLHttpRequest}catch(e){Result=false}}else if(window.ActiveXObject){try{Result=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{Result=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){Result=false}}}return Result};var consoleLog=function(log){};var consoleError=function(log){};Cookie.SendUserId=function(key){if(key===null||key===""||key===undefined){return}var protocol="https:"===document.location.protocol?"https://":"http://";var xhr=this.GetXMLHttpRequest();var reqUrl=protocol+host+"/api/";this.CookieAccessor();if(!this.isValidUniqueId()){naCookies.__na_unique_id=this.getUniqueStr();this.save()}var params={__na_url:location.href,__na_user_id:key,__na_unique_id:naCookies.__na_unique_id};var paramsArr=this.getPostParamArray(params);try{xhr.open("POST",reqUrl,true);if(xhr.timeout!==undefined){xhr.timeout=2e3}xhr.onload=function(e){if(xhr.readyState===4){if(xhr.status===200){consoleLog(xhr.responseText)}else{consoleError(xhr.statusText)}}};xhr.onerror=function(e){consoleError(xhr.statusText)};xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.send(paramsArr.join("&"))}catch(e){consoleError(e)}};Cookie.CheckTag=function(tag,dom_id,target_id){if(tag===null||tag===""){return}var protocol="https:"===document.location.protocol?"https://":"http://";var xhr=this.GetXMLHttpRequest();var reqUrl=protocol+host+"/api/tag.php";this.CookieAccessor();if(!this.isValidUniqueId()){naCookies.__na_unique_id=this.getUniqueStr();this.save()}
1var params={__na_tag:tag,__na_unique_id:naCookies.__na_unique_id,__na_target_id:target_id||""};var paramsArr=this.getPostParamArray(params);try{xhr.open("POST",reqUrl,true);if(xhr.timeout!==undefined){xhr.timeout=2e3}xhr.onload=function(e){if(xhr.readyState===4){if(xhr.status===200){if(xhr.response){tagView(JSON.parse(xhr.response),dom_id)}}else{consoleError(xhr.statusText)}}};xhr.onerror=function(e){consoleError(xhr.statusText)};xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.send(paramsArr.join("&"))}catch(e){consoleError(e)}};var tagView=function(tag,dom_id){var $dom=tag.target===true?dom_id[0]:dom_id[1];document.getElementById($dom).style.display="block"};Cookie.addItems=function(items){if(items===null||items===""||items===undefined)return;var protocol="https:"===document.location.protocol?"https://":"http://";var xhr=this.GetXMLHttpRequest();var reqUrl=protocol+host+"/s/";this.CookieAccessor();if(this.isFirstVisit()||this.isSessionExpired()||!this.isValidUniqueId()){this.resetSession();this.save()}items.user.unique_id=naCookies.__na_unique_id;items.visit_id=naCookies.__na_visit_id;items.visit_url=document.URL;try{xhr.open("POST",reqUrl,true);if(xhr.timeout!==undefined){xhr.timeout=2e3}xhr.onload=function(e){if(xhr.readyState===4){if(xhr.status===200){consoleLog(xhr.responseText)}else{consoleError(xhr.statusText)}}};xhr.onerror=function(e){consoleError(xhr.statusText)};xhr.setRequestHeader("Content-type","application/json");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.send(JSON.stringify(items))}catch(e){consoleError(e)}};Cookie.SendSelectedRecommend=function(key){if(key===null||key===""||key===undefined)return;var protocol="https:"===document.location.protocol?"https://":"http://";var xhr=this.GetXMLHttpRequest();var reqUrl=protocol+host+"/api/recommend.php";this.CookieAccessor();if(this.isFirstVisit()||this.isSessionExpired()||!this.isValidUniqueId()){this.resetSession();this.save()}var params={__na_selected_recommend:key,__na_unique_id:naCookies.__na_unique_id,__na_visit_id:naCookies.__na_visit_id};var postArr=this.getPostParamArray(params);var browserParamArr=this.getBrowserParamArray();var paramsArr=postArr.concat(browserParamArr);try{xhr.open("POST",reqUrl,true);if(xhr.timeout!==undefined){xhr.timeout=2e3}xhr.onload=function(e){if(xhr.readyState===4){if(xhr.status===200){consoleLog(xhr.responseText)}else{consoleError(xhr.statusText)}}};xhr.onerror=function(e){consoleError(xhr.statusText)};xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.send(paramsArr.join("&"))}catch(e){consoleError(e)}};return Cookie}();

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.