Sanketwable / Follow_Everyone_On_GITHUB

Golang script to follow everyone on GitHub
9 stars 3 forks source link

Add Unfollow Script to New .go file #3

Open Sanketwable opened 3 years ago

Sanketwable commented 3 years ago

Enhancement

Hint: Just in place of PUT request to the GitHub API use DELETE request with same token and header parameters.

Don't change content of main.go file create another file using new package in new folder

noob-alert commented 2 years ago

In case someone does not want to go through the hassle of looking through the code and tried this just out of fun and is not stuck with following too many people, you can use this small script in your browsers console after opening your following page, This will manually click all the unfollow buttons. go to github.com/?tab=followers

// getting the parent div for the unfollow list (this might change later)
let l = document.querySelector('div.container-xl:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1)')
let m = Array(...l.children)
for(let i=0; i<m.length; i++) {
  let entry = m[i]
    let btn = entry.querySelector('input[value="Unfollow"]')
    if (btn) {
    btn.click()
  }
}