怎么用代码的方式批量删除微博?
1、复制这一段代码:
// ==UserScript==
// @name Weibored.js
// @namespace https://vito.sdf.org
// @version 0.2.0
// @description 删除所有微博
// @author Vito Van
// @match https://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);
2、然后点右键,找到“审查元素”
3、把代码粘进Console
而后点击Enter
1、此时需要注意,这个方法只能一次性删除一页的微博,即45条,大家要谨慎操作哦!