Skip to content

Instantly share code, notes, and snippets.

@ryancastro
Created February 25, 2014 21:57
Show Gist options
  • Save ryancastro/9218749 to your computer and use it in GitHub Desktop.
Save ryancastro/9218749 to your computer and use it in GitHub Desktop.
Delete all of your Facebook activity. Uses the mobile interface rather than the normal browser interface because this way is much faster and reliable.
// Load Facebook's mobile activity log
// https://m.facebook.com/#{you}/allactivity?log_filter=all
// loads jQuery into Facebook
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// wait for jQuery to load up.
setTimeout(removeIt, 2000);
function removeIt() {
jQuery.noConflict();
// This is the 'drop down' that exposes the post options of a post. Click them all.
jQuery('[data-sigil="touchable flyout-causal"]').trigger("click");
// Find all spans that say "delete", and click them.
deletes = jQuery("span:contains(Delete)");
console.log("Deleted " + deletes.length);
jQuery("span:contains(Delete)").trigger("click");
// Find all spans that say "unlike", and click them.
unlikes = jQuery("span:contains(Unlike)");
console.log("Unliked " + unlikes.length);
unlikes.trigger("click");
console.log("purge done");
};
// You've now deleted or unliked everything in the page. Expand the days, months, and years, to delete more.
@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