Skip to content

Instantly share code, notes, and snippets.

@lmchawla
Last active October 25, 2018 15:27
Show Gist options
  • Save lmchawla/f4150c9b3fe2151f434efdc944ee2660 to your computer and use it in GitHub Desktop.
Save lmchawla/f4150c9b3fe2151f434efdc944ee2660 to your computer and use it in GitHub Desktop.
Delete old facebook pending posts
function clickok(){lls=document.getElementsByClassName('_42ft _4jy0 layerCancel uiOverlayButton _4jy3 _4jy1 selected _51sy')
for(var i=0;i<lls.length;i++){
if(lls[i].textContent=="OK"){
lls[i].click();
}
}}
function delete1(){
clickok();
document.querySelector('a[ajaxify*="/ajax/groups/mall/delete/"]').click();
if(to_delete){return to_delete.click();}
document.querySelector('a[ajaxify*="delete.php"]').click();
window.scrollTo(0,document.body.scrollHeight);
}
window.setInterval(delete1,1500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment