Created
March 20, 2023 08:03
-
-
Save therealak12/7c5bce0371ace98f2a1ebdd14dcb5674 to your computer and use it in GitHub Desktop.
Automatically delete Clockify records
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
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