This file contains 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
# 1 Create a file minify.py in that directory with these contents or download it | |
# 2 Execute it with the command 'py tcxcombiner.py' in order to combine the files into one, and to optionally minify it | |
# The minification works by removing every x location data point and removing 94% of the distanceMeters, time, and altiitude tag. | |
# If any of them are desired, edit the following Trues to False | |
remove_distance = True | |
remove_time = True | |
remove_altitude = True |
This file contains 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
// # Javascript to copy in dev tools console | |
let data = await (await fetch("https://www.mapmyrun.com/internal/allWorkouts/?started_after=2020-01-29")).json() | |
// Change started_after for date you want to filter from or remove entirely for every workout | |
// Api parameters: | |
// number user= *id* - can be found in url of the person's profile ie https://www.mapmyrun.com/profile/[id]/activity_feed | |
// ISO-8601-date started_after= *date* for example this is valid 2020-01-29 | |
// ISO-8601-date started_before= *date* this is another valid date 2011-10-05T14:48:00.000Z | |
// Remove ?user= to access only your own workouts | |
// Example url using all 3 parameters | |
// https://www.mapmyrun.com/internal/allWorkouts/?started_after=2020-01-29&started_before=2021-5-29&user=123456789 |
This file contains 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 sendMsg(msg) { | |
let txt = document.querySelectorAll('._13NKt')[1] | |
txt.innerText = msg | |
let startTypingEv = new InputEvent('input', { | |
bubbles: true | |
}); | |
txt.dispatchEvent(startTypingEv) | |
let enterEv = new KeyboardEvent('keydown', {altKey:false, | |
bubbles: true, | |
cancelBubble: false, |
This file contains 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
// If you want to extend this functionality here are some docs: https://docs.mapbox.com/mapbox-gl-js/example/geojson-layer-in-stack/ | |
// To add layers not in strava (ie cyclepaths specifically maybe) this looks promising: https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/ | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
// Go to dark mode | |
for (let elt of document.querySelectorAll('label')) { | |
if (elt.innerHTML.includes('Dark')) { |