如何刪微博

官方關閉了借口,批量刪除的小工具全部陣亡。用這個腳本可以快一點點:
?// ==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,566評論 0 106
  • 文/風雨綫 寫下標題,就不由地想起了王維在《漢江臨眺》中云:“襄陽好風日,留醉與山翁。”學不來詩佛的詩情畫意,道不...
    風雨綫閱讀 582評論 7 3
  • 暖春里的柳條 鵝黃的嫩葉 煥光的灰皮 輕搖的舞姿 悄悄的又換了一個春天 仍記得 風不來 你那般溫順的垂著 風一來 ...
    綠毛水怪不是妖妖閱讀 261評論 0 0
  • 已經提交辭呈一個多星期了,在等待離職的日子里真的很煎熬,辦公室里只有我與我的領導,每天只有下班才打聲招呼,平時幾乎...
    Miss芽美閱讀 320評論 2 0
  • “聽到她心跳那一瞬間,我覺得我對她沒有任何期望,健康就好”我還是依稀一字不漏地記得這句讓人泫然欲泣的話語。這是柴靜...
    擎擎C閱讀 116評論 0 0