Commit 320f034 1 parent f9647e3 commit 320f034 Copy full SHA for 320f034
File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 4
4
[ ![ npm] ( https://img.shields.io/npm/l/express.svg )] ( https://github.com/xuanmiaog/hexo-baidu-url-push/blob/master/LICENSE )
5
5
[ ![ ] ( https://img.shields.io/badge/npm-package-brightgreen.svg )] ( https://www.npmjs.com/package/hexo-baidu-url-push )
6
6
[ ![ ] ( 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 )
7
8
8
9
## 简介
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
+ ```
10
26
11
27
> 自动推送是百度站长平台为提高站点新增网页发现速度推出的工具,安装自动推送JS代码的网页,在页面被访问时,页面URL将立即被推送给百度。
12
28
You can’t perform that action at this time.
0 commit comments