Skip to content

Instantly share code, notes, and snippets.

@rushter
Last active August 30, 2025 08:18
Show Gist options
  • Select an option

  • Save rushter/b5ed683d95fe1c92f669da074b117d8f to your computer and use it in GitHub Desktop.

Select an option

Save rushter/b5ed683d95fe1c92f669da074b117d8f to your computer and use it in GitHub Desktop.
Strava bulk remove activities in Chrome dev tools
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