Last active
October 3, 2022 08:22
-
-
Save moeinalmasi/88c3014a8e8429f472eddb2706bfcf7a to your computer and use it in GitHub Desktop.
Unlike All Facebook Pages
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
// Run it at your own risk!! | |
// If you have been on Facebook since 2004 and happened to like ton of pages and wanna get rid of them all at once... | |
// Navigate to https://www.facebook.com/pages/?category=liked and run the the following snippet in the developer console... | |
var fb_unlike_all = () => { | |
[].slice | |
.call(document.querySelectorAll("button")) | |
.filter((x) => x.innerText.indexOf("Liked") != -1) | |
.map((x) => { | |
x.click(); | |
}); | |
window.scrollTo(0, document.body.scrollHeight); | |
window.setTimeout(fb_unlike_all, 3 * 1000); | |
}; | |
fb_unlike_all(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice one. In case this doesn't work for others, I had to add 2 things:
querySelectorAll
unfortunately)Updated version: