Skip to content

Instantly share code, notes, and snippets.

@shrihari1999
Created January 9, 2024 11:10
Show Gist options
  • Select an option

  • Save shrihari1999/0a28a0a569790859df02fdca75df7f8f to your computer and use it in GitHub Desktop.

Select an option

Save shrihari1999/0a28a0a569790859df02fdca75df7f8f to your computer and use it in GitHub Desktop.
Deletes all contacts from freshchat recycle bin
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
let startPage = 1;
let endPage = 86;
async function demo() {
for(let i=startPage; i<=endPage; i++){
$($(`.rs-pagination-btn[title="${i}"]`)).trigger('click')
await sleep(2000);
$($('.button-default_nCal_maHPVOgELiI').get(2)).trigger('click')
await sleep(2000);
$($('.button-default_nCal_maHPVOgELiI').get(2)).trigger('click')
await sleep(1500);
$('.ember-view.ui-modal input').val('4701')
$('.ember-view.fsa-custom-button.fsa-btn-primary').prop('disabled', false).trigger('click')
await sleep(3000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment