如何刪微博

官方關(guān)閉了借口,批量刪除的小工具全部陣亡。用這個腳本可以快一點點:
?// ==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);

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 1.幾種基本數(shù)據(jù)類型?復(fù)雜數(shù)據(jù)類型?值類型和引用數(shù)據(jù)類型?堆棧數(shù)據(jù)結(jié)構(gòu)? 基本數(shù)據(jù)類型:Undefined、Nul...
    極樂君閱讀 5,878評論 0 106
  • 文/風(fēng)雨綫 寫下標(biāo)題,就不由地想起了王維在《漢江臨眺》中云:“襄陽好風(fēng)日,留醉與山翁。”學(xué)不來詩佛的詩情畫意,道不...
    風(fēng)雨綫閱讀 659評論 7 3
  • 暖春里的柳條 鵝黃的嫩葉 煥光的灰皮 輕搖的舞姿 悄悄的又換了一個春天 仍記得 風(fēng)不來 你那般溫順的垂著 風(fēng)一來 ...
    綠毛水怪不是妖妖閱讀 279評論 0 0
  • 已經(jīng)提交辭呈一個多星期了,在等待離職的日子里真的很煎熬,辦公室里只有我與我的領(lǐng)導(dǎo),每天只有下班才打聲招呼,平時幾乎...
    Miss芽美閱讀 348評論 2 0
  • “聽到她心跳那一瞬間,我覺得我對她沒有任何期望,健康就好”我還是依稀一字不漏地記得這句讓人泫然欲泣的話語。這是柴靜...
    擎擎C閱讀 130評論 0 0

友情鏈接更多精彩內(nèi)容