Skip to content

Instantly share code, notes, and snippets.

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 michaelmcmillan/d7430c2f8b17249f8903b07076f94a00 to your computer and use it in GitHub Desktop.
Save michaelmcmillan/d7430c2f8b17249f8903b07076f94a00 to your computer and use it in GitHub Desktop.
// The shitty Cloudflare UI does not let you select multiple records to be deleted.
// If you have a huge zone file this takes ages to do manually, so I've created this
// script to run in the console of your browser. It will delete every single record.
setInterval(function () {
Array.from(document.querySelectorAll('button')).filter(el => el.innerText.includes('Edit'))[0].click();
setTimeout(function () { Array.from(document.querySelectorAll('button')).filter(el => el.innerHTML.includes('Delete'))[0].click(); }, 2000);
setTimeout(function () { Array.from(document.querySelectorAll('button')).filter(el => el.innerHTML.includes('Delete'))[1].click(); }, 5000);
}, 8000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment