/*** 取巧利用了博客园可自定义页头页脚的方式改了这个url 如何强制在访问博客园博客的时候变成博客园分配的二级域名方式 ****/ (function(){ function fixAnchor(anchor){ if(anchor){ if(anchor.pathname.indexOf("/liubeimeng/")==0){ var url="http://liubeimeng.cnblogs.com/"+anchor.pathname.replace("/liubeimeng/","")+anchor.search+anchor.hash; anchor.href=url; }else if(anchor.pathname.indexOf("liubeimeng/")==0){ var url="http://liubeimeng.cnblogs.com/"+anchor.pathname.replace("liubeimeng/","")+anchor.search+anchor.hash; anchor.href=url; } } } var a=document.createElement("a"); a.href=window.location.href; if(a.pathname.indexOf("/liubeimeng/")==0){ var url="http://liubeimeng.cnblogs.com/"+a.pathname.replace("/liubeimeng/","")+a.search+a.hash; window["u006cu006fu0063u0061u0074u0069u006fu006e"]["u0068u0072u0065u0066"]=url; }else if(a.pathname.indexOf("liubeimeng/")==0){ var url="http://liubeimeng.cnblogs.com/"+a.pathname.replace("liubeimeng/","")+a.search+a.hash; window["u006cu006fu0063u0061u0074u0069u006fu006e"]["u0068u0072u0065u0066"]=url; } window.onload=function(){ var anchors=document.getElementsByTagName("a"); for(var i=0;i<anchors.length;i++){ fixAnchor(anchors[i]); } }; })();