Last active
March 4, 2021 05:57
-
-
Save RinorDreshaj/dec2fb8de630fc56eacf to your computer and use it in GitHub Desktop.
A script to remove all Likes from facebook
This file contains hidden or 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
var likedPages = document.getElementsByClassName("PageLikedButton"); | |
var count = 0; | |
function unlikePages(){ | |
var liked = likedPages.item(count); | |
var mouseOverEvent = document.createEvent("MouseEvents"); | |
mouseOverEvent.initEvent("mouseover",true,false); | |
liked.dispatchEvent(mouseOverEvent); | |
setTimeout(function(){ | |
var unlikeButton = document.querySelector(".InterestListMenuDisconnect a"); | |
var clickEvent = document.createEvent("MouseEvents"); | |
clickEvent.initEvent("click",true,false); | |
unlikeButton.dispatchEvent(clickEvent); | |
},300) | |
count++; | |
if(count < likedPages.length){ | |
setTimeout(unlikePages,1000); | |
} | |
} | |
setTimeout(unlikePages, 500) |
A new version would be nice. But I fear the new GUI is too complicated for that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This one is for deleting all your photos...
https://gist.github.com/stubar/1c98070dad9196b6d3971e09b0eb6e81