这是网络上查找到的 windows 批量删除微博的代码。如果想批量删除微博,具体步骤如下:
1、登录微博,打开主页,拉到最底直到显示页码,如第1页;
2、按F12键,在展开的对话框中点击“console”项;
3、在输入框中把以下的代码复制进去,按回车,微博显示的当前页面就被全部删除。
这种删除是把当前的微博页内容删除,不能删除没有显示出来的其他所有的微博。
// ==UserScript==
// @name Weibored.js
// @namespacehttps://vito.sdf.org
// @version 0.2.0
// @description 删除所有微博
// @author Vito Van
// @matchhttps://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() {
if (!$('a[action-type="feed_list_delete"]')) {
$('a.next').click();
} else {
$('a[action-type="feed_list_delete"]')[0].click();
$('a[action-type="ok"]')[0].click();
}
// scroll bottom let auto load
$('html, body').animate({ scrollTop: $(document).height() }, 'slow');
}, 800);
};
document.head.appendChild(s);