Skip to content

Instantly share code, notes, and snippets.

@jkjustjoshing
Last active April 6, 2017 05:53
Show Gist options
  • Save jkjustjoshing/66232b2d8dcdd2bc181d to your computer and use it in GitHub Desktop.
Save jkjustjoshing/66232b2d8dcdd2bc181d to your computer and use it in GitHub Desktop.
Garmin export bookmarklet
(function() {
var jQuery = document.querySelector('iframe').contentWindow.jQuery;
jQuery('.activityName').each(function(){
var $this = jQuery(this);
$this.css({
overflow:'auto',
width:'200px'
});
});
jQuery('.activityName').find('a').each(function(){
var $this = jQuery(this);
var id=$this.attr('href').substr(17);
var url='https://connect.garmin.com/proxy/activity-service-1.1/gpx/activity/' + id + '?full=true';
var $a = jQuery('<a download>(exp)</a>');
$a.attr('href', url);
$this.parent().append($a);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment