百度主动推送代码 批量推送页面全部链接

<script type="text/javascript">
//by http://www.rjsx.net/
var list = document.getElementsByTagName("a");
var n = "http//api.share.baidu.com/s.gif";
var ns = "https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif"; 
var r = window.location.href;
var url = [];
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
for(var i=0;i<list.length;++i){
    if (typeof(list[i].href) != "undefined"){ 
    url.push(ns+'?l='+encodeURIComponent(list[i].href));
    }
}
} else {
for(var i=0;i<list.length;++i){
    if (typeof(list[i].href) != "undefined"){ 
    url.push(n+'?r='+r+'&l='+encodeURIComponent(list[i].href));
    }
}
}
for(var i=0;i<list.length;++i){
    var t = new Image;
    t.src = url[Math.round(Math.random() * list.length)];
}; 
</script>

百度主动推送代码,批量推送页面所有URL。改进修复推送undefined错误问题。

posted @ 2021-01-16 15:10  heiheidou  阅读(377)  评论(0编辑  收藏  举报
http://www.zjkweiqi.cn/mdown/4818.html http://www.zjkweiqi.cn/mdown/4817.html 甘雨 http://www.zjkweiqi.cn/pcdown/93713.html http://www.zjkweiqi.cn/pcdown/1281.html http://www.zjkweiqi.cn/pcdown/2417.html http://www.zjkweiqi.cn/pcdown/93704.html http://www.zjkweiqi.cn/mdown/164.html http://www.zjkweiqi.cn/mdown/4871.html 游戏 手机软件 http://www.zjkweiqi.cn/pcdown/4646.html 甘雨 滴滴车主司机端下载