Skip to content

Instantly share code, notes, and snippets.

@hermesthecat
Forked from ryancastro/fb_delete.js
Last active August 29, 2015 14:09
Show Gist options
  • Save hermesthecat/10afaa84d1b361ac25ad to your computer and use it in GitHub Desktop.
Save hermesthecat/10afaa84d1b361ac25ad to your computer and use it in GitHub Desktop.
// 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment