Created
November 18, 2024 19:44
-
-
Save egeste/324b2448b7dae5e27adfe2c2c1605b2b to your computer and use it in GitHub Desktop.
Delete your instagram posts - sloppy, but it works
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
USERNAME="insert_username_here" | |
const delete_next_post = () => { | |
document.querySelector(`[href^="/${USERNAME}/p/"]`).click() | |
setTimeout(() => { | |
document.querySelector('svg[aria-label="More options"]').parentElement.parentElement.parentElement.click() | |
setTimeout(() => { | |
document.querySelectorAll('[role=dialog] button').entries().find(([i, n]) => n.innerText === 'Delete')[1].click() | |
setTimeout(() => { | |
document.querySelectorAll('[role=dialog] button').entries().find(([i, n]) => n.innerText === 'Delete')[1].click() | |
setTimeout(() => { | |
if (document.querySelector(`[href^="/${USERNAME}/p/"]`)) { | |
delete_next_post() | |
} | |
}, 5000) | |
}, 1000) | |
}, 1000) | |
}, 1000) | |
} | |
delete_next_post() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment