Last active
May 7, 2023 10:52
-
-
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)
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
// 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