Last active
January 20, 2023 00:00
-
-
Save reustle/71882f572be3246a24fd312a9894ff3b to your computer and use it in GitHub Desktop.
Delete Facebook Mobile Photos https://reustle.org/delete-facebook-mobile-uploads
This file contains 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
setInterval(function(){ | |
// Open options menu on first photo | |
document.querySelectorAll('div[aria-label="Edit"]')[0].click(); | |
// Click the delete dropdown menu item | |
setTimeout(function(){ | |
document.querySelectorAll('div[role="menuitem"]')[2].click(); | |
}, 1000); | |
// Click delete in the confirmation modal | |
setTimeout(function(){ | |
let modalActions = document.querySelectorAll('div[aria-label="Delete"]'); | |
modalActions.forEach(function(thisLink){ | |
if(thisLink.innerText == "Delete"){ | |
thisLink.click(); | |
} | |
}) | |
}, 2500) | |
}, 6000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment