Skip to content

Commit 320f034

Browse files
committed
README Update
1 parent f9647e3 commit 320f034

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,25 @@
44
[![npm](https://img.shields.io/npm/l/express.svg)](https://github.com/xuanmiaog/hexo-baidu-url-push/blob/master/LICENSE)
55
[![](https://img.shields.io/badge/npm-package-brightgreen.svg)](https://www.npmjs.com/package/hexo-baidu-url-push)
66
[![](https://img.shields.io/badge/Hexo-2.4%2B-brightgreen.svg)](http://hexo.io)
7+
[![](https://img.shields.io/npm/dy/hexo-baidu-url-push?label=download)](https://www.npmjs.com/package/hexo-baidu-url-push)
78

89
## 简介
9-
![jspush](https://www.xuanmiao.info/2017/03/19/Hexo-Plugin-%E7%99%BE%E5%BA%A6%E9%93%BE%E6%8E%A5%E8%87%AA%E5%8A%A8%E6%8E%A8%E9%80%81%E5%B7%A5%E5%85%B7/jspush.JPG)
10+
11+
```javascrips
12+
(function(){
13+
var bp = document.createElement('script');
14+
var curProtocol = window.location.protocol.split(':')[0];
15+
if (curProtocol === 'https') {
16+
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
17+
}
18+
else {
19+
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
20+
}
21+
var s = document.getElementsByTagName("script")[0];
22+
s.parentNode.insertBefore(bp, s);
23+
})();
24+
</script>
25+
```
1026

1127
> 自动推送是百度站长平台为提高站点新增网页发现速度推出的工具,安装自动推送JS代码的网页,在页面被访问时,页面URL将立即被推送给百度。
1228

0 commit comments

Comments
 (0)