hexo/themes/blank/layout/partial/_third-party/baidu-push.ejs

17 lines
513 B
Plaintext
Raw Normal View History

2024-05-09 10:56:56 +08:00
<% if (theme.baidu_push.enable){ %>
<script type="text/javascript">
(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>
<% } %>