Skip to content

Instantly share code, notes, and snippets.

@timss
Created October 3, 2023 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timss/cbeb51836d5da4b848f1fe2e685bad1a to your computer and use it in GitHub Desktop.
Save timss/cbeb51836d5da4b848f1fe2e685bad1a to your computer and use it in GitHub Desktop.
Bulk edit gear on Strava activties
// https://old.reddit.com/r/Strava/comments/hw7zh0/how_to_bulk_edit_shoes_on_your_activities/
// Follow instructions above to get shoe ID
var shoe_id = 123456789
// Open inline/quick edit for each activity
document.querySelectorAll('.quick-edit').forEach(b => b.click())
// Unhide shoe selection if hidden due to it being "run-only"
var shoes = document.querySelectorAll('.shoe-id')
for (var i = 0; i < shoes.length; i++) {
shoes[i].parentElement.parentElement.setAttribute('style', '');
console.log(shoes[i].parentElement.parentElement.style);
}
// Set shoe for each activity
// Might want to check if something not already set/whatever here
shoes.forEach(b => b.value = shoe_id)
// Save
document.querySelectorAll('.btn-default.btn-sm.btn').forEach((b, i) => setTimeout(() => { b.click() }, 500 * i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment