Skip to content

Instantly share code, notes, and snippets.

@stephenhandley
Last active March 29, 2022 21:11
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 stephenhandley/171b32e298c4ae0f0787d15e30192ae4 to your computer and use it in GitHub Desktop.
Save stephenhandley/171b32e298c4ae0f0787d15e30192ae4 to your computer and use it in GitHub Desktop.
how 2 delete yr instagrams
function select(selector) {
return document.querySelector(selector)
}
function click(selector) {
try {
const el = select(selector)
if (el) {
el.click()
}
} catch (error) {
console.error(`selector ${selector} not found`)
throw error
}
}
function clickAndWait(selector, timeout) {
return new Promise(function (resolve) {
click(selector)
setTimeout(function () {
resolve()
}, timeout)
});
}
async function insta() {
const sels = {
thumbnail: '.v1Nh3.kIKUG._bz0w a',
dots: '.MEAGs button.wpO6b',
del: '.mt3GC button.aOOlW.-Cab_',
confirm: '.piCib button.aOOlW.-Cab_',
}
while(true) {
await clickAndWait(sels.thumbnail, 1000)
await clickAndWait(sels.dots, 1000)
await clickAndWait(sels.del, 1000)
await clickAndWait(sels.confirm, 2000)
}
}
@stephenhandley
Copy link
Author

  1. open your profile
  2. open the browser console
  3. enter the above code
  4. type insta()
  5. enjoy

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