Skip to content

Instantly share code, notes, and snippets.

@therealak12
Created March 20, 2023 08:03
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 therealak12/7c5bce0371ace98f2a1ebdd14dcb5674 to your computer and use it in GitHub Desktop.
Save therealak12/7c5bce0371ace98f2a1ebdd14dcb5674 to your computer and use it in GitHub Desktop.
Automatically delete Clockify records
const timer = ms => new Promise(res => setTimeout(res, ms))
const delayMs = 4000;
const repeat = 30;
async function deleteRecord () {
for (var i = 0; i < repeat; i++) {
document.querySelector('.pointer.cl-non-selectable.cl-component-divided-left.cl-d-flex.cl-dropdown-toggle.cl-no-arrow').click()
document.querySelector('a[data-cy="delete-button"]').click()
document.querySelector('button[class="cl-btn cl-btn-danger"]').click()
await timer(delayMs);
}
}
deleteRecord();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment