Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Strava GPX Bookmarklet
//see https://www.reddit.com/r/Strava/comments/vum8qe/bookmarklet_for_easy_access_to_gpx_files/
for (let e of document.querySelectorAll('[data-field-name=name]')){
let h = e.href;
let a = document.createElement("a");
let l = document.createTextNode("GPX");
a.appendChild(l);
a.title = "GPX Data";
a.href = h + "/export_gpx";
a.style = "float:right;";
e.parentNode.appendChild(a);
}
//javascript:(function()%7Bfor%20(let%20e%20of%20document.querySelectorAll('%5Bdata-field-name%3Dname%5D'))%7Blet%20h%20%3D%20e.href%3Blet%20a%20%3D%20document.createElement(%22a%22)%3Blet%20l%20%3D%20document.createTextNode(%22GPX%22)%3Ba.appendChild(l)%3Ba.title%20%3D%20%22GPX%20Data%22%3Ba.href%20%3D%20h%20%2B%20%22%2Fexport_gpx%22%3Ba.style%20%3D%20%22float%3Aright%3B%22%3Be.parentNode.appendChild(a)%3B%7D%7D)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment