Last active
October 12, 2015 19:38
-
-
Save mazesoul87/4077642 to your computer and use it in GitHub Desktop.
快速删除微薄javascript版
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*本代码用于删除自己所有新浪微薄所用,执行前请慎重,本人不负一切责任 | |
* 用法: | |
* 1.打开自己新浪微薄个人主页 | |
* 2.Firefox用户打开firebug(没有firebug的自行安装),chrome用户请按ctrl+shift+J | |
* 3.复制一下代码,firefox用户将代码复制到控制台,点击运行。chrome用户将代码复制到控制台点击回车即可。等待所有微薄删除完毕 | |
* 4.可根据自身情况修改time1与time2加快删除速度。time1与time2单位为毫秒。如遇程序停止,微薄还未删除干净,可刷新页面重新运行程序 | |
*/ | |
jq=document.createElement("SCRIPT"); | |
jq.src="http://code.jquery.com/jquery-latest.pack.js"; | |
document.getElementsByTagName("HEAD")[0].appendChild(jq); | |
time1 = 5000; | |
time2 = 20000; | |
function del_weibo(){ | |
if($("a[action-type='feed_list_retry']")&&$("a[action-type='feed_list_retry']").is(":visible")){ | |
$("a[action-type='feed_list_retry']")[0].click(); | |
} | |
window.scrollTo(0,99999); | |
if(!$(".W_pages")||!$(".W_pages").is(":visible")){ | |
setTimeout(del_weibo,time1); | |
}else{ | |
$(".WB_feed_type").each(function(index,el){ | |
if($(el).attr("mid").length != 0){ | |
$.post("http://weibo.com/aj/mblog/del?_wv=5&__rnd="+Date.parse(new Date()),{_t:0,mid:$(el).attr("mid")}) | |
} | |
}); | |
if($("a[action-type='feed_list_page_next']").is(":visible")){ | |
$("a[action-type='feed_list_page_next']")[0].click(); | |
setTimeout(del_weibo,time2); | |
} | |
} | |
} | |
del_weibo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment