Created
May 7, 2026 15:26
-
-
Save leoduquesnel/6bf7cddcaa7325d639cc52660d3cdf10 to your computer and use it in GitHub Desktop.
Console snippet to bulk-delete all files on grok.com/files — repeatedly clicks the trash icon and confirms, with a 400ms delay between deletions.
This file contains hidden or 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
| (function loop() { | |
| const trash = document.querySelector('button[aria-label="Delete file"]'); | |
| if (!trash) { console.log('done'); return; } | |
| trash.click(); | |
| setTimeout(() => { | |
| const confirm = | |
| document.querySelector('button[aria-label="Delete"]') || | |
| [...document.querySelectorAll('button.text-fg-danger')] | |
| .find(el => el.textContent.trim() === 'Delete'); | |
| if (confirm) confirm.click(); | |
| else console.log('no confirm shown — continuing'); | |
| setTimeout(loop, 400); | |
| }, 400); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment