Skip to content

Instantly share code, notes, and snippets.

@jimmykane
Created April 12, 2019 18:57
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 jimmykane/e2b22cffebf7af11564b1fd6bc619e38 to your computer and use it in GitHub Desktop.
Save jimmykane/e2b22cffebf7af11564b1fd6bc619e38 to your computer and use it in GitHub Desktop.
!function(){!function(e,o){const t=`${e}.fit`;fetch(`/apiserver/v1/workout/exportFit/${e}${o}`,{method:"GET",cache:"no-cache",headers:{STTAuthorization:window.localStorage.sessionkey}}).then(e=>e.blob()).then(e=>URL.createObjectURL(e)).then(e=>{window.document.body.innerHTML=`<h2><a href="${e}" download="${t}">Download FIT</a></h2>`})}(window.location.pathname.split("/").filter(Boolean).pop(),"?autogeneraterecords=true&generatefillerlaps=true&removesinglelocation=true")}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment