Skip to content

Instantly share code, notes, and snippets.

@mgks
Last active May 7, 2023 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgks/54a75275b2a0b8e9e5165947b035743a to your computer and use it in GitHub Desktop.
Save mgks/54a75275b2a0b8e9e5165947b035743a to your computer and use it in GitHub Desktop.
Bulk remove liked pages from facebook with JavaScript. (last rev. 2019, may not work anymore)
// first select all liked buttons
var buttons = document.getElementsByClassName('PageLikedButton');
// launch pop for liked button
for(let button of buttons){
button.click();
};
// select unlike button parent to prevent timeline button clicks
var unlikes = document.getElementsByClassName('InterestListMenuDisconnect');
// get unlike button and launch click action
for(let unlike of unlikes){
var pages = unlike.getElementsByClassName('itemLabel')[0];
pages.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment