自动取消所有微博关注
// ==UserScript==
// @name 取消所有微博关注
// @namespace http://github.com/imlinhanchao/canel_all_watch_in_weibo
// @version 0.1
// @description 自动取消所有微博关注
// @author Hancel
// @match https://weibo.com/p/*/myfollow
// @grant none
// ==/UserScript==
(function() {
'use strict';
function sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
window.onload = async () => {
Array.from(document.getElementsByTagName('a')).filter(a => a.getAttribute('action-type') == 'cancel_follow_single');
await sleep(2000);
location = location;
}
})();