Created
March 4, 2018 13:54
-
-
Save sakex/c46f3a8bf8b9d6633291c270ae7b929e to your computer and use it in GitHub Desktop.
instaUnfollow.js
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
const getList = () => { | |
let elems = document.getElementsByClassName("_2nunc"); | |
elems = [...elems]; | |
elems = elems.map(elem => elem.querySelector("a").innerHTML); | |
elems = new Set(elems); | |
return elems; | |
} | |
// Open followers tab | |
const followers = getList(); | |
// Open following tab | |
const following = getList(); | |
const notBack = [...following].filter(elem => !followers.has(elem)) | |
for(let elem of containers){ | |
if(notBack.has(elem.querySelector("._2nunc").querySelector("a").innerHTML)){ | |
elem.querySelector("button").click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment