如何删微博

官方关闭了借口,批量删除的小工具全部阵亡。用这个脚本可以快一点点:
​// ==UserScript==
// @name Weibored.js
// @namespace http://vito.sdf.org
// @version 0.1
// @description 删除所有微博
// @author Vito Van
// @match http://weibo.com/p/*
// @grant none
// ==/UserScript==
'use strict';

var s = document.createElement("script");
s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
s.onload = function(){
setInterval(function(){
$('a[title="删除此条微博"]')[0].click();
$('a[action-type="ok"]')[0].click();
}, 800);
}
document.head.appendChild(s);

---------------update 20170920-----------------------

'use strict';
var s = document.createElement("script");
s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
s.onload = function(){
setInterval(function(){
if (document.getElementsByClassName("W_layer_close").length > 0){
//error
$('a[action-type="ok"]')[0].click();
console.log ("error" + document.getElementsByClassName("page S_bg1")[0].text)
$(".next")[0].click();
}else{
var aa = $('a[action-type="delComment"]').length;
console.log(aa);
if ( aa > 1){
$('a[action-type="delComment"]')[0].click();
$('a[action-type="ok"]')[0].click();
}else{
$(".next")[0].click();
console.log("next page" + document.getElementsByClassName("page S_bg1")[0].text)
}
}

}, 800);

}
document.head.appendChild(s);

//倒过来删
'use strict';
var s = document.createElement("script");
s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
s.onload = function(){
setInterval(function(){
var aa = 0;
if (document.getElementsByClassName("W_layer_close").length > 0){
$('a[action-type="ok"]')[0].click();
console.log ("There is error")
$(".prev")[0].click();
}else{
if (Number(document.getElementsByClassName("page S_bg1")[0].text) < 10){
aa = document.getElementsByClassName("page").length - 2;
document.getElementsByClassName("page")[aa].click();
console.log("will go to last");
}else{
aa = $('a[action-type="delComment"]').length;
console.log(aa);
if ( aa > 0){
$('a[action-type="delComment"]')[0].click();
$('a[action-type="ok"]')[0].click();
}else{
$(".prev")[0].click();
console.log(document.getElementsByClassName("page S_bg1")[0].text)
}
}
}
}, 1200);
}
document.head.appendChild(s);

//只删本页
'use strict';
var s = document.createElement("script");
s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
s.onload = function(){
setInterval(function(){
var aa = 0;
aa = $('a[action-type="delComment"]').length;
console.log(aa);
if ( aa > 0){
$('a[action-type="delComment"]')[0].click();
$('a[action-type="ok"]')[0].click();
}
}, 1200);
}
document.head.appendChild(s);

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1.几种基本数据类型?复杂数据类型?值类型和引用数据类型?堆栈数据结构? 基本数据类型:Undefined、Nul...
    极乐君阅读 5,574评论 0 106
  • 文/風雨綫 写下标题,就不由地想起了王维在《汉江临眺》中云:“襄阳好风日,留醉与山翁。”学不来诗佛的诗情画意,道不...
    風雨綫阅读 589评论 7 3
  • 暖春里的柳条 鹅黄的嫩叶 焕光的灰皮 轻摇的舞姿 悄悄的又换了一个春天 仍记得 风不来 你那般温顺的垂着 风一来 ...
    绿毛水怪不是妖妖阅读 266评论 0 0
  • 已经提交辞呈一个多星期了,在等待离职的日子里真的很煎熬,办公室里只有我与我的领导,每天只有下班才打声招呼,平时几乎...
    Miss芽美阅读 320评论 2 0
  • “听到她心跳那一瞬间,我觉得我对她没有任何期望,健康就好”我还是依稀一字不漏地记得这句让人泫然欲泣的话语。这是柴静...
    擎擎C阅读 120评论 0 0