function ajaxObject(){var xmlHttp;try{xmlHttp=new XMLHttpRequest()}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){console.log("您的浏览器不支持AJAX!");return false}}}return xmlHttp} function ajaxPost(url,data){var ajax=ajaxObject();ajax.open("post",url,true);ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");ajax.onreadystatechange=function(){};ajax.send(data)} function addEvent(obj,type,handle){try{obj.addEventListener(type,handle,false)}catch(e){try{obj.attachEvent('on'+type,handle)}catch(e){obj['on'+type]=handle}}} function setCookie(cname,cvalue,exdays){var d=new Date();d.setTime(d.getTime()+(exdays*24*60*60*1000));var expires="path=/;expires="+d.toUTCString();document.cookie=cname+"="+cvalue+"; "+expires} function getElementsbyClassName(n){var classElements=[],allElements=document.getElementsByTagName('*');for(var i=0;i0) { outputer = '百度浏览器'; } else if (r = e.match(/UBrowser([\d]*)\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'UCBrowser' + ' ' + r1[1] } else if (r = e.match(/UCBrowser([\d]*)\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'UCBrowser' + ' ' + r1[1] } else if (r = e.match(/MetaSr/ig)) { outputer = '搜狗浏览器' } else if (r = e.match(/2345Explorer/ig)) { outputer = '2345王牌浏览器' } else if (r = e.match(/2345chrome/ig)) { outputer = '2345加速浏览器' } else if (r = e.match(/LBBROWSER/ig)) { outputer = '猎豹安全浏览器' } else if (r = e.match(/MicroMessenger\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = '微信' + ' ' + r1[1] } else if (r = e.match(/MQQBrowser\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = '手机QQ浏览器' + ' ' + r1[1] } else if (r = e.match(/QQBrowser\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'QQ浏览器' + ' ' + r1[1] } else if (r = e.match(/QQ\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'QQ浏览器' + ' ' + r1[1] } else if (r = e.match(/MiuiBrowser\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'Miui浏览器' + ' ' + r1[1] } else if (r = e.match(/Chrome([\d]*)\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'Chrome' + ' ' + r1[1] } else if (r = e.match(/safari\/([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'Apple Safari' + ' ' + r1[1] } else if (r = e.match(/Opera[\s|\/]([^\s]+)/ig)) { var r1 = r[0].split("/"); outputer = 'Opera' + ' ' + r1[1] } else if (r = e.match(/Trident\/7.0/gi)) { outputer = 'Internet Explorer 11' } else if (r = e.match(/MSIE\s([^\s|;]+)/gi)) { outputer = 'Internet Explorer' + ' ' + r[0] } else if (ua.match(/chrome/) != null) { var is360 = _mime("type", "application/vnd.chromium.remoting-viewer"); function _mime(option, value) { var mimeTypes = navigator.mimeTypes; for (var mt in mimeTypes) { if (mimeTypes[mt][option] == value) { return true; } } return false; } if(is360) outputer = '360'; } else { outputer = '其它浏览器' } return outputer; } catch(e) {return ""} } function replaceurl(url){return url.replace(/\?/g,"**1**").replace(/\&/g,"**2**").replace(/\%/g,"**3**").replace(/\//g,"**4**").replace(/\#/g,"**5**")} var r_date; var _record_count=0; var _long_count=0; function record() { var myDate = new Date(); if (r_date != myDate.toLocaleString()) { r_date = myDate.toLocaleString(); try { var data_type = this.getAttribute("data-type") ? this.getAttribute("data-type") : 'false'; var data_follow = this.getAttribute("data-follow") ? 'true' : 'false'; if (data_type != 'false') ajaxPost('http://api.yifengyunche.com/sem/yftj/shijian/pass/yifeng', "siteid=122&data_type=" + data_type +"&data_follow="+data_follow+"&visitor_no="+getCookie("visitor_no")+"&page=" + replaceurl(location.href) + "&agent="+ replaceurl(broName())+"&referrer=" + encodeURIComponent(replaceurl(encodeURI(encodeURI(document.referrer))))) } catch(e) {} } } function bind_record(){var _record=getElementsbyClassName("record");_record_count=_record.length;for(var i=0;i<_record.length;i++){(function(i){_record[i].removeEventListener("click",record,false);addEvent(_record[i],"click",record);_record[i].style.cursor="pointer"})(i)}var _long=getElementsbyClassName("touch");_long_count=_long.length;for(var i=0;i<_long.length;i++){(function(i){_long[i].style.cursor="pointer";var timeout=undefined;_long[i].addEventListener('touchstart',function(event){timeout=setTimeout(record.bind(_long[i]),800)},false);_long[i].addEventListener('touchend',function(event){clearTimeout(timeout)},false)})(i)}} function listener(){var _record=getElementsbyClassName("record");var _long=getElementsbyClassName("touch");if((_record_count!=_record.length)||(_long_count!=_long.length)){_record_count=_record.length;_long_count=_long.length;bind_record()}} window.setInterval(function(){listener()},300); var xhr = new XMLHttpRequest(); var g_url=get_url(); xhr.open("GET", g_url, true); xhr.onload = function (e) { if (xhr.readyState === 4) { if (xhr.status === 200) { var visitor_no=xhr.responseText.replace(/(^\s*)|(\s*$)/g, ""); if(visitor_no!=false){setCookie("visitor_no",visitor_no,365);} } else {} } }; xhr.onerror = function (e) { console.error(xhr.statusText); }; xhr.send(null);