B站一键取消关注

进入到上面的页面,然后f12进入控制台console,粘贴代码,回车运行
注意!每次运行只会取消关注当前页面的up,运行完需要刷新一下页面再次运行

var cancelButtons = Array.from(document.querySelectorAll('.be-dropdown-item'))
.filter(function(button) {
return button.textContent.includes('取消关注');
});
function clickButtonWithDelay(button, delay) {
setTimeout(function() {
button.click();
}, delay);
}
cancelButtons.forEach(function(button, index) {
var delay = (index + 1) * 100;
clickButtonWithDelay(button, delay);
});