Skip to content

Instantly share code, notes, and snippets.

@sae13
Created September 9, 2023 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sae13/9bf28227b0bd61b3ee4f830aab310c23 to your computer and use it in GitHub Desktop.
Save sae13/9bf28227b0bd61b3ee4f830aab310c23 to your computer and use it in GitHub Desktop.
delete all outlook.com mails
function dd() {
try {
document.querySelector('button[title="انتخاب همه موارد در نما"]').click();
document.querySelector('button[title="حذف کردن (Del)"]').click()
} catch (error) {
console.table(error)
}
setTimeout(dd,400)
}
@sae13
Copy link
Author

sae13 commented Oct 9, 2023

function dd() {
    try {
        Array.from(document.querySelectorAll('.listItemDefaultBackground')).filter(q=>q.querySelector('.ms-font-weight-semilight') != null && q.querySelector('.ms-font-weight-semilight').innerText.includes('email@email.com')).forEach(q=>q.querySelector('button').click());document.querySelector('button[title="حذف کردن (Del)"]').click()
    } catch (error) {
        console.table(error)
    }
     
setTimeout(dd,1000)
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment