!(){varn={},t={};=(n,e){vari=;if(i>1)t[n]=e;(1==i){if(""!=)[n];for()n.hasOwnProperty(o)&&(t[o]=n[o])}},"F"inwindow||(window.F=n)}();;(function(){varparam='';varcontextObj={user:{uid:"",encodeUid:"",user:"",ssid:"",lightapp:""},paramURL:function(url){varurlParts=url.split("#");varurl=urlParts[0];varhash=urlParts[1];varquery=url.indexOf('?')===-1?'':url.substr(url.indexOf("?")+1);varorigionParams=query.split(/=[^&]*vartmpParam=param;for(vari=0;i
if(origionParams[i])
tmpParam=tmpParam.replace(newRegExp(origionParams[i]+"[^&]*"),"");
}
tmpParam=tmpParam.replace(/&+/g,"&").replace(/^
varres=url+(query?"&":"?")+tmpParam;
hash&&(res+=("#"+hash));
//如果是sf外部访问知道,需要加上域名,为了让replace识别,先将host结尾带斜杠
varcurrentDomain='https://zhidao.baidu.com/';
currentDomain=currentDomain.substring(0,currentDomain.length-1);
varhost=/^(zhidao|wapiknow)\.baidu\.com$/.test(location.host)?'':currentDomain;
//由于转换的case太多,故只针对以//|http://|https://|/四种情况识别为URL,进行域名转换
varisUrl=/^((http|https):)?\/\/|^\//.test(res);
varwholeUrl='';
if(isUrl){
wholeUrl=/^((http|https):)?\/\//.test(res)?res:(host+res);
}
else{
wholeUrl=res;
if(origionParams[i])
tmpParam=tmpParam.replace(newRegExp(origionParams[i]+"[^&]*"),"");
}
tmpParam=tmpParam.replace(/&+/g,"&").replace(/^
varres=url+(query?"&":"?")+tmpParam;
hash&&(res+=("#"+hash));
//如果是sf外部访问知道,需要加上域名,为了让replace识别,先将host结尾带斜杠
varcurrentDomain='https://zhidao.baidu.com/';
currentDomain=currentDomain.substring(0,currentDomain.length-1);
varhost=/^(zhidao|wapiknow)\.baidu\.com$/.test(location.host)?'':currentDomain;
//由于转换的case太多,故只针对以//|http://|https://|/四种情况识别为URL,进行域名转换
varisUrl=/^((http|https):)?\/\/|^\//.test(res);
varwholeUrl='';
if(isUrl){
wholeUrl=/^((http|https):)?\/\//.test(res)?res:(host+res);
}
else{
wholeUrl=res;
发表评论