Created
October 3, 2023 15:37
-
-
Save timss/cbeb51836d5da4b848f1fe2e685bad1a to your computer and use it in GitHub Desktop.
Bulk edit gear on Strava activties
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
// 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