Skip to content

Instantly share code, notes, and snippets.

@robertoentringer
Created September 19, 2020 09:36
Show Gist options
  • Save robertoentringer/efe44e1da5c911837240d1c60291111b to your computer and use it in GitHub Desktop.
Save robertoentringer/efe44e1da5c911837240d1c60291111b to your computer and use it in GitHub Desktop.
Javascript snippet to remove all Facebook friends in 2020

Open the console and run de code

;(()=>{
    document.querySelectorAll('[data-sigil$="undoable-action"]').forEach((friend,i)=>{

        setTimeout(()=>{

            scroll({
                top: friend.offsetTop,
                behavior: "smooth"
            });

            friend.querySelector('[data-sigil$="are-friends-popup"]').click()
            friend.querySelector('[data-sigil$="m-unfriend-request"]').click()
            console.log(friend.querySelector('h3').textContent)
        }
        , i * 4000);

    }
    )
}
)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment