Created
November 17, 2017 08:56
-
-
Save mixj93/23edf871e0a35440cf1fcfdd5b55e6b8 to your computer and use it in GitHub Desktop.
web-auto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var followList = document.querySelectorAll(".member_li") | |
for (var i = 0; i < 0; i++) { | |
var evt = new MouseEvent('click', { | |
bubbles: true, | |
cancelable: true, | |
view: window | |
}); | |
followList[i].dispatchEvent(evt) | |
} | |
document.querySelector("a[action-type='batselect']").click() | |
var list = document.querySelectorAll(".member_li") | |
for (var i = 0; i < list.length; i++) { | |
list[i].click() | |
} | |
// 取消关注 | |
document.querySelector("a[action-type='cancel_follow_all']").click() | |
setTimeout(function() { | |
document.querySelector("a[action-type='ok']").click() | |
}, 500) | |
document.querySelector("a[action-type='batselect']").click() | |
var list = document.querySelectorAll(".member_li") | |
for (var i = 0; i < list.length; i++) { | |
list[i].click() | |
} | |
// 移除好友 | |
document.querySelector("a[action-type='moveout_friends']").click() | |
setTimeout(function() { | |
document.querySelector("a[action-type='ok']").click() | |
}, 500) | |
// 删除微博 | |
setInterval(function() { | |
var deleteBtns = document.querySelectorAll("a[action-type='feed_list_delete']") | |
if (deleteBtns.length > 0) { | |
deleteBtns[0].click() | |
document.querySelector("a[action-type='ok']").click() | |
} | |
}, 1000) | |
// 取消好友圈关注 | |
setInterval(function() { | |
var cancelBtns = document.querySelectorAll("a[action-type='cancel_follow_single']") | |
if (cancelBtns.length > 0) { | |
cancelBtns[0].click() | |
document.querySelector("a[action-type='ok']").click() | |
if (document.querySelector("a[action-type='ok']")) { | |
document.querySelector("a[action-type='ok']").click() | |
} | |
} | |
}, 2000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment