Last active
April 6, 2017 05:53
-
-
Save jkjustjoshing/66232b2d8dcdd2bc181d to your computer and use it in GitHub Desktop.
Garmin export bookmarklet
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
(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