Skip to content

Instantly share code, notes, and snippets.

@Terrance
Last active January 24, 2016 09:07
Show Gist options
  • Save Terrance/c5078439a255e61a0bf2 to your computer and use it in GitHub Desktop.
Save Terrance/c5078439a255e61a0bf2 to your computer and use it in GitHub Desktop.
A JavaScript snippet for removing likes on public statuses on Facebook. Operates on the mobile site (https://m.facebook.com/<you>/allactivity?log_filter=likes) by searching for lines with a "Public" tag. You need to expand times to search first.
// for all public tags
$(".sx_c87e68").each(function(i, e) {
// navigate up to the root of the item
var r = $(e).parent().parent().parent().parent().parent().next();
var id = r.parent().attr("id");
// open the dropdown
r.find("i").click();
// find the corresponding menu
$(".accelerate").find("a").each(function(j, l) {
if ($(l).data("store").domID == id) {
// click the "Unlike" option
$($(l).find("span")[0]).click();
}
});
});
// click all the "Load more" links
$("._3nt5.sectionContent._56d8").click();
@shackrock
Copy link

Can you include some instructions on how to use this with tampermonkey?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment