Created
May 7, 2026 15:26
-
-
Save leoduquesnel/6bf7cddcaa7325d639cc52660d3cdf10 to your computer and use it in GitHub Desktop.
Revisions
-
leoduquesnel created this gist
May 7, 2026 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ (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); })();