Last active
August 30, 2025 08:18
-
-
Save rushter/b5ed683d95fe1c92f669da074b117d8f to your computer and use it in GitHub Desktop.
Strava bulk remove activities in Chrome dev tools
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 sleep(ms) { | |
| return new Promise((resolve) => setTimeout(resolve, ms)); | |
| } | |
| async function deleteActivities(max_pages = 25) { | |
| for (let i = 0; i < max_pages; i++) { | |
| console.log(`Round ${i + 1} of ${max_pages}`); | |
| // Delete all items | |
| document.querySelectorAll(".btn.btn-link.btn-xs.delete").forEach((el) => el.click()); | |
| await sleep(5000); | |
| // Click next page button | |
| const nextBtn = document.querySelector(".btn.btn-default.btn-sm.next_page"); | |
| if (nextBtn) { | |
| nextBtn.click(); | |
| console.log("Next page clicked"); | |
| } else { | |
| console.log("No next page button found — stopping"); | |
| break; | |
| } | |
| await sleep(2000); | |
| } | |
| } | |
| window.confirm = () => true; | |
| window.alert = () => {}; | |
| deleteActivities(25); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment