1fb20c1f19aca567bc4c5a1b039c47c4a3627f975cb21c52940867b911913348

Source Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>

<script language="javascript">
if (typeof Object !== 'undefined') {

var _ref = '';
var _url = '';
var _xid = '';
var _nortb_mapping = 0;
var _flag_last_target = 1;
var _flag_last_mapping = 1;
var _from = '';

var _now = getUnixTime();
var ins = [];

jsGet();

_ref = ins["ref"];
_xid = ins["xid"];
_nortb_mapping = ins["nortbsync"] >= 1 ? 1 : 0;
_from = ins["from"];

if(typeof(_url)=="undefined"){ _url = '';}
if(typeof(_ref)=="undefined"){ _ref = '';}
if(typeof(_xid)=="undefined"){ _xid = '';}
if(typeof(_from)=="undefined"){ _from = '';}

// get cookie
var _uid_from_cookie = ReadCookie("uid");
var _uid = _uid_from_cookie;
var _lastwrite_target = ReadCookie("lastW_target") || 0;
var _lastwrite_mapping = ReadCookie("lastW_mapping") || 0;


// 1call a day
if (_now - _lastwrite_target < 3600*24) {_flag_last_target = 0; }
if (_now - _lastwrite_mapping < 3600*12) {_flag_last_mapping = 0; }


// store and sync uid
if (! _uid && is_mobile_safari() && support_localStorage()) {
    _uid = window.localStorage.getItem('_fout_uid');
}
if (! _uid && is_mobile_safari()) {
    get_smartphone_uid();
}
if (_uid) {
    send_uid(_uid, _xid, _ref, _url);
}

var idsync_endpoints = [
    {
        'url': 'jp-u.openx.net/w/1.0/sd?id=537072523&val=',
        'need_dspid': true
    },
    {
        'url': 'jp-u.openx.net/w/1.0/sd?id=537072523&val=',
        'need_dspid': true,
        'is_mobile': true
    },
    {
        'url': 'cm.g.doubleclick.net/pixel?google_nid=freakout&google_cm&google_sc&from_google=2'
    },
    {
        'url': 'cm.g.doubleclick.net/pixel?google_nid=freakout&google_cm&google_sc&from_google=2',
        'is_mobile': true
    },
    {
        'url': 'cm.g.doubleclick.net/pixel?google_nid=freakout&from_google=3&google_hm=',
        'need_dspid': true,
        'base64_dspid': true
    },
    {
        'url': 'cm.g.doubleclick.net/pixel?google_nid=freakout&from_google=3&google_hm=',
        'need_dspid': true,
        'base64_dspid': true,
        'is_mobile': true
    },
    {
        'url': 'sync.ad-stir.com/?symbol=GREE',
        'is_mobile': true
    },
    {
        'url': 's-cs.send.microad.jp/cs?key=freakout_2',
        'is_mobile': true
    },
    {
        'url': 'secure.adnxs.com/setuid?entity=125&code=',
        'need_dspid': true
    },
    {
        'url': 'secure.adnxs.com/setuid?entity=125&code=',
        'is_mobile': true,
        'need_dspid': true
    },
    {
        'url': 'pixel.rubiconproject.com/tap.php?v=59910&nid=3504&put=',
        'need_dspid': true
    },
    {
        'url': 'pixel.rubiconproject.com/tap.php?v=59910&nid=3504&put=',
        'need_dspid': true,
        'is_mobile': true
    },
    {
        'url': 'ssp-sync.i-mobile.co.jp/sync.ashx?dspid=5'
    },
    {
        'url': 'ssp-sync.i-mobile.co.jp/sync.ashx?dspid=6',
        'is_mobile': true
    },
    {
        'url': 'simage2.pubmatic.com/AdServer/Pug?vcode=bz0yJnR5cGU9MSZjb2RlPTMwOTcmdGw9NDMyMDA=&piggybackCookie=',
        'need_dspid': true
    },
    {
        'url': 'simage2.pubmatic.com/AdServer/Pug?vcode=bz0yJnR5cGU9MSZjb2RlPTMwOTcmdGw9NDMyMDA=&piggybackCookie=',
        'need_dspid': true,
        'is_mobile': true
    },
    {
        'url': 'pixel.advertising.com/ups/55966/sync?_origin=1&uid=',
        'need_dspid': true
    },
    {
        'url': 'pixel.advertising.com/ups/55966/sync?_origin=1&uid=',
        'need_dspid': true,
        'is_mobile': true
    },
    {
        'url': 'ad.caprofitx.adtdp.com/v1/cookiesync?fout_uid=',
        'need_dspid': true,
        'is_mobile': true
    },
    {
        'url': 'ssl.socdm.com/rtb/sync?proto=adgen&dspid=9002',
        'is_mobile': true
    }
];

if (_uid_from_cookie && _flag_last_mapping == 1) {
    if (_nortb_mapping === 0) {
        var i, n = idsync_endpoints.length;
        for (i = 0; i < n; i++) {
            send_beacon(idsync_endpoints[i], window.navigator.userAgent, _uid_from_cookie);
        }
    }

    // audience mapping
    if (_now - _lastwrite_mapping >= 3600 * 24) {
        if (_from != 'dmp' && _from != 'retargeting') {
            // Audience Manager
            var _am_beacon_url = 'https://dpm.demdex.net/ibs:dpid=16292&dpuuid=' + _uid_from_cookie;
            (new Image()).src = _am_beacon_url;
            // treasuredata
            var _td_beacon_url = 'https://in.treasuredata.com/postback/v3/event/freakout/sync?td_format=pixel&td_write_key=8151/9bfe2b558c976822508fbb722fc8d005e8af87f1&td_global_id=td_global_id&td_ua=td_ua&uid=' + _uid_from_cookie + '&td_record_time=' + _now;
            (new Image()).src = _td_beacon_url;
        }
        // Intimate Merger
        var _im_beacon_url = 'https://sync.im-apps.net/imid/set?cid=3947&tid=foid&uid=' + _uid_from_cookie;
        (new Image()).src = _im_beacon_url;
    }

    WriteCookie("lastW_mapping", _now, 365);
}

// cross device sync
if (is_mobile(navigator.userAgent)) {
    cross_device_sync();
}

}

// functions

function send_uid(_uid, _xid, _ref, _url) {
    if (String(_uid).match(/[^\w-]/)) return;

    var cookie_key = 'lastW_target',
        ls_key = '_sync_lasttime',
        _now = getUnixTime(),
        _lastwrite_target = ReadCookie('lastW_target') || 0,
        _beacon_url;

    if (!_lastwrite_target && support_localStorage()) {
        _lastwrite_target = window.localStorage.getItem(ls_key);
    }
    if (typeof(_url) === 'undefined') _url = '';
    if (typeof(_ref) === 'undefined') _ref = '';
    if (typeof(_xid) === 'undefined') _xid = '';
    _lastwrite_target = _lastwrite_target || 0;

    if (_now - _lastwrite_target >= 3600 * 24) {
        if (! (is_mobile_safari() && support_localStorage()) && _xid) {
            _beacon_url = 'https://sync.fout.jp/sync?noback=1' +
                '&xid=' + _xid + '&rurl=' + _ref + '&url=' + _url;
            (new Image()).src = _beacon_url;
            WriteCookie(cookie_key, _now, 365);
        }
    }
}

function support_localStorage() {
    var ret = false;

    try {
        if (window.localStorage) {
            ret = true;
        }
    } catch (e) {
    }

    return ret;
}

function DM_onSegsAvailable(rsinetsegs, csid) {
    console.log('This function is abolished.'); // 60549
}

// get
function jsGet() {
    var query = window.location.search.substring(1);
    var parms = query.split('&');
    for (var i=0; i<parms.length; i++) {
        var pos = parms[i].indexOf('=');
        if (pos > 0) {
            var key = parms[i].substring(0,pos);
            var val = parms[i].substring(pos+1);
            //qsParm[key] = decodeURIComponent(val);
            ins[key] = val;
        }
    }
}


// read
function ReadCookie(key) {
     var sCookie = document.cookie;
     var aData = sCookie.split(";");
     var oExp = new RegExp(" ", "g");
     key = key.replace(oExp, "");
     var i = 0;
     while (aData[i]) {
          var aWord = aData[i].split("=");
          aWord[0] = aWord[0].replace(oExp, "");
          if (key == aWord[0]) return unescape(aWord[1]);
          if (++i >= aData.length) break;
     }
     return "";
}

// write
function WriteCookie(key, value, days) {
     if (String(value).match(/[^\w-]/)) { value = ''; }
     var str = key + "=" + escape(value) + ";";
     if (days !== 0) {
          var dt = new Date();
          dt.setDate(dt.getDate() + days);
          str += "expires=" + dt.toGMTString() + ";";
          str += "domain=.fout.jp;path=/;";
     }
    if (needsSameSite()) {
        str += "SameSite=None;secure;";
    }

     document.cookie = str;
}

function needsSameSite () {
    var uagent = navigator.userAgent.toLowerCase();
    if (document.location.protocol === 'https:' && /chrome/.test(uagent) && !/crios/.test(uagent)) {
        var found = uagent.match(/chrome\/([0-9]+)\./);
        if (found && found[1] && parseInt(found[1], 10) >= 76) {
            return true;
        }
    }
    return false;
}

function getUnixTime() {
    return parseInt((new Date())/1000, 10);
}

// generate uid
function get_smartphone_uid() {
    if (is_mobile_safari() && support_localStorage()) {
        var obj = document.createElement("iframe");
        obj.src = "https://dsp.fout.jp/js/uid_generator.html";
        obj.style.display = "none";
        document.body.appendChild(obj);
    }
}

function is_mobile_safari() {
    var useragents = [
        'iPhone', // Apple iPhone
        'iPod',   // Apple iPod touch
        'iPad'    // Apple iPad
    ];
    var pattern = new RegExp(useragents.join('|'),'i');
    return pattern.test(navigator.userAgent);
}

function appendScript(src) {
    var el = document.createElement('script');
    el.type = 'text/javascript';
    el.async = true;
    el.src = src;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(el, s);
}

function is_mobile(user_agent) {
    var mobile_ua = ['iPhone', 'iPod', 'iPad', 'Android'];
    var pattern = new RegExp(mobile_ua.join('|'),'i');
    return pattern.test(user_agent);
}

function send_beacon(setting, user_agent, uid) {
    var ua_is_mobile = is_mobile(user_agent);
    if (setting.is_mobile && !ua_is_mobile) return;
    if (!setting.is_mobile && ua_is_mobile) return;
    if (throttle_request(setting)) return;

    var endpoint = 'https://' + setting.url;
    if (setting.need_dspid)
        endpoint += setting.base64_dspid ? window.btoa(uid).replace(/\//g, '_').replace(/\+/g, '-').replace(/=/g, '') : uid;
    (new Image()).src = endpoint;
}

function cross_device_sync() {
    var el = document.createElement('script');
    el.type = 'text/javascript';
    el.async = true;
    el.src = 'https://js.fout.jp/prefs.js';
    el.onload = function() {
        if (!window.fortyone || !window.fortyone.collect) {
            return;
        }
        var payload = window.fortyone.collect();
        if (!payload) {
            return;
        }
        var query = 'type=cross_device&payload=' + payload;
        try {
            document.domain = 'fout.jp';
            if (_from == 'ad' && window.parent && window.parent._fout_cross_device_sync_data) {
                query += '&cdat=' + encodeURIComponent(window.parent._fout_cross_device_sync_data);
            }
        } catch (e) {
        }
        (new Image()).src = 'https://sync.fout.jp/sync?' + query;
    };
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(el, s);
}

function throttle_request(setting) {
    if (typeof(setting.request_probs) === 'undefined') {
        return false;
    } else {
        return Math.random() >= setting.request_probs;
    }
}

</script>


</body>
</html>