Skip to content

Instantly share code, notes, and snippets.

@brainpicture
Last active May 1, 2020 23:22
Show Gist options
  • Save brainpicture/7c0aed1506b82695d9ec212523506138 to your computer and use it in GitHub Desktop.
Save brainpicture/7c0aed1506b82695d9ec212523506138 to your computer and use it in GitHub Desktop.
let elsDom, els, y = 20
let lst = (tagName) => {
let elsDom = document.getElementsByTagName("span"), res = []
for(var i in elsDom) if (elsDom[i].innerHTML == tagName) res.push(elsDom[i])
return res
}, next = () => {
setTimeout(() => {
y += 60
window.scrollTo(0, y)
els = lst("Following")
els.shift();els.shift()
go()
}, 100)
}, go = () => {
let el = els.shift()
if (!el) return next()
el.click()
setTimeout(() => {
next()
lst("Unfollow")[0].click()
}, 300)
}
next()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment