-
-
Save ruevaughn/0466bd9f94d34303a79a94ecb286ff69 to your computer and use it in GitHub Desktop.
JavaScript to Delete all (most) Facebook Activity as of 20201103
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
// 1. Navigate to your Activity Log | |
// 2. Paste this into the JavaScript Console | |
function clickDelete() { | |
document.querySelectorAll('[aria-label="Move to Trash"]')[0].click() | |
} | |
function clickMenu() { | |
document.querySelectorAll('[role="menuitem"]')[2].click(); | |
setTimeout(clickDelete, 250); | |
} | |
function showMenu() { | |
document.querySelectorAll('[aria-label="Action options"]')[0].click(); | |
setTimeout(clickMenu, 250); | |
} | |
var t = setInterval(showMenu, 750); | |
// To end it, run: | |
// | |
// clearInterval(t) | |
// |
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
function clickDelete() { | |
document.querySelectorAll('[role="button"] div div span span').forEach(function (e) { if (e.innerText == "Delete") e.click(); }); | |
} | |
function clickMenu() { | |
document.querySelectorAll('[role="menuitem"]')[2].click(); | |
setTimeout(clickDelete, 500); | |
} | |
function showMenu() { | |
document.querySelectorAll('[aria-label="Actions for this post"]')[0].click() | |
setTimeout(clickMenu, 500); | |
} | |
var t = setInterval(showMenu, 1100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment