Created
June 13, 2019 21:52
-
-
Save LeiHao0/b571d09be5b5985e1b59c5ecb2980ecb to your computer and use it in GitHub Desktop.
DeleteZhihu
This file contains hidden or 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
function findBtn(text) { | |
var buttons = document.querySelectorAll("button"); | |
btns = []; | |
for (var i = 0, l = buttons.length; i < l; i++) { | |
if (buttons[i].lastChild.nodeValue == text) btns.push(buttons[i]); | |
} | |
return btns; | |
} | |
a = findBtn("设置"); | |
for (i in a) { | |
a[i].click(); | |
b = findBtn("删除"); | |
for (j in b) { | |
b[j].click(); | |
} | |
} | |
setTimeout(() => { | |
c = findBtn("确认"); | |
for (k in c) { | |
c[k].click(); | |
} | |
window.location.reload(); | |
}, 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment