window.apjxqBidding={ "run":function(){ this.body=document.getElementsByTagName('body')[0]; this.createBrowser();//创建浏览记录请求 }, "createBrowser":function(){ var bu=''; if(window.top.document.referrer.length>0){ bu=window.document.referrer; }else{ try{ if(opener.location.href.length>0){ bu = opener.location.href; } }catch(e){} } if(this.strCmp(bu)){ return false; }; var h=window.screen.height?window.screen.height:window.screen.availHeight;//屏幕分辨率的高 var w=window.screen.width?window.screen.width:window.screen.availWidth;//屏幕分辨率的宽 var c=(navigator.appName=="Netscape")?window.screen.pixelDepth:window.screen.colorDepth;//位彩色 var lang= navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLanguage||navigator.appVersion;//浏览器默认语言 var ios=navigator.platform;//当前操作系统 var f=this.getFlash();//false版本 var pb=navigator.productSub?navigator.productSub:0;//产品其他信息 var mim=navigator.mimeTypes.length;//支出的mim类型 var pn=navigator.plugins.length;//支持插件类型 var cpu=navigator.cpuClass?navigator.cpuClass:0;//CPU平台 var date =new Date(); var min = date.getTimezoneOffset(); var getV='hw='+h+'x'+w+'&cr='+c+'&lang='+lang+'&ios='+ios+'&fl='+f+'&cpu='+cpu+'&pb='+pb+'&mim='+mim+'&pn='+pn+'&tz='+(0-min/60)+this.getKey(bu); var srcV=this.urlJoin(apjxqBiddingUrl,getV); var scriptO=document.createElement('script'); scriptO.src=srcV; scriptO.type='text/javascript'; this.body.appendChild(scriptO); }, 'getKey':function(str){//获取单前是哪个种类的检测 var preg=/http\w?:\/\/.*?\.((baidu|google|so|360|sogou))\./gi; str.match(preg); if(RegExp.$1=='baidu'){ var baidupreg=/wd=(.[^&]*)/gi; str.match(baidupreg); return '&dt=1'; }else if(RegExp.$1=='sogou'){ var sogoupreg=/query=(.[^&]*)/gi; str.match(sogoupreg); return '&dt=2'; }else if(RegExp.$1=='360'){ var preg360=/q=(.[^&]*)/gi; str.match(preg360); return '&dt=3'; }else if(RegExp.$1=='so'){ var sosoupreg=/q=(.[^&]*)/gi; str.match(sosoupreg); return '&dt=3'; }else if(RegExp.$1=='google'){ var gugepreg=/q=(.[^&]*)/gi; str.match(gugepreg); return '&dt=4'; }else{ return '&dt=0'; } },'getFlash':function(){ var falsev=''; if (navigator.plugins && navigator.mimeTypes.length) { var d = navigator.plugins["Shockwave Flash"]; d && d.description && (falsev = d.description.replace(/^.*\s+(\S+)\s+\S+$/, "$1")) }else if(window.ActiveXObject){ d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); falsev = d.GetVariable("$version"); falsev = falsev.replace(/^.*\s+(\d+),(\d+).*$/, "$1.$2"); } return falsev; }, "urlJoin":function(url,V){ var reg=/.+\?/i; if(reg.test(url)){ url=url+'&'+V+'&T='+Math.random(); }else{ url=url+'?'+V+'&T='+Math.random(); } return url; }, "strCmp":function(url){ if(url==''){ return true; } var Reg=/http[s]?:\/\/([^\/]*)/i; url.match(Reg); var startLocal=RegExp.$1; var endHref=window.location.href; endHref.match(Reg); var endLocal=RegExp.$1; if(startLocal==endLocal){ return true; } return false; } } apjxqBidding.run();