“MediaWiki:Common.js”的版本间的差异
来自百问网嵌入式Linux wiki
Baiwen root(讨论 | 贡献) |
|||
第1行: | 第1行: | ||
− | /* | + | /*********百度主动推送代码***********/ |
− | <script | + | <script> |
− | function | + | (function(){ |
− | + | var bp = document.createElement('script'); | |
− | + | var curProtocol = window.location.protocol.split(':')[0]; | |
− | + | if (curProtocol === 'https') { | |
− | + | bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
+ | else { | ||
+ | bp.src = 'http://push.zhanzhang.baidu.com/push.js'; | ||
+ | } | ||
+ | var s = document.getElementsByTagName("script")[0]; | ||
+ | s.parentNode.insertBefore(bp, s); | ||
+ | })(); | ||
+ | </script> | ||
+ | |||
+ | |||
+ | /*******360主动收录代码**************/ | ||
+ | <script>(function(){ | ||
+ | var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?9d91b9d962051daef41972684348663d":"https://jspassport.ssl.qhimg.com/11.0.1.js?9d91b9d962051daef41972684348663d"; | ||
+ | document.write('<script src="' + src + '" id="sozz"><\/script>'); | ||
+ | })(); | ||
</script> | </script> |
2018年1月30日 (二) 15:51的版本
/*********百度主动推送代码***********/
<script>
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
/*******360主动收录代码**************/
<script>(function(){
var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?9d91b9d962051daef41972684348663d":"https://jspassport.ssl.qhimg.com/11.0.1.js?9d91b9d962051daef41972684348663d";
document.write('<script src="' + src + '" id="sozz"><\/script>');
})();
</script>