打开/关闭菜单
1683
2.2万
6529
11.7万
舰R百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

MediaWiki:Common.js:修订间差异

MediaWiki界面页面
Donnyjie留言 | 贡献
无编辑摘要
Donnyjie留言 | 贡献
无编辑摘要
第527行: 第527行:


/* 百度推送 */
/* 百度推送 */
 
/*
(function(){
(function(){
     var bp = document.createElement('script');
     var bp = document.createElement('script');
第540行: 第540行:
         s.parentNode.insertBefore(bp, s);
         s.parentNode.insertBefore(bp, s);
})();
})();
*/
/*百度推送改*/
(function(){
var canonicalURL, curProtocol;
//Get the <link> tag
var x=document.getElementsByTagName("link");
//Find the last canonical URL
if(x.length > 0){
    for (var i=0;i<x.length;i++){
        if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
            canonicalURL=x[i].href;
        }
    }
}
//Get protocol
if (!canonicalURL){
    curProtocol = window.location.protocol.split(':')[0];
}
else{
    curProtocol = canonicalURL.split(':')[0];
}
//Get current URL if the canonical URL does not exist
if (!canonicalURL) canonicalURL = window.location.href;
//Assign script content. Replace current URL with the canonical URL
!function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();


/*齐柏林页面专用*/
/*齐柏林页面专用*/