Skip to content

Instantly share code, notes, and snippets.

@RinorDreshaj
Last active March 4, 2021 05:57
Show Gist options
  • Save RinorDreshaj/dec2fb8de630fc56eacf to your computer and use it in GitHub Desktop.
Save RinorDreshaj/dec2fb8de630fc56eacf to your computer and use it in GitHub Desktop.
A script to remove all Likes from facebook
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)
@XDqrkneZ
Copy link

updated 2018 please?

@stubar
Copy link

stubar commented Mar 26, 2018

Thanks for writing this, still works for me. This will surely be very popular at the moment.

@stubar
Copy link

stubar commented Apr 9, 2018

This one is for deleting all your photos...

https://gist.github.com/stubar/1c98070dad9196b6d3971e09b0eb6e81

@krischik
Copy link

krischik commented Jan 8, 2021

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