Skip to content

Instantly share code, notes, and snippets.

@stravawatts
Last active January 3, 2016 06:39
Show Gist options
  • Save stravawatts/8424162 to your computer and use it in GitHub Desktop.
Save stravawatts/8424162 to your computer and use it in GitHub Desktop.
Garmin Plugin Debugging Paste this code into browser console after loading this page: http://www.strava.com/upload/garmin
// Garmin Plugin Debugging
// Paste this code into browser console after loading this page:
// http://www.strava.com/upload/garmin
var garminDeviceView = new Strava.Uploads.GarminDeviceView({el: $('#garminDevice')});
var garminPluginView = new Strava.Uploads.GarminPluginView({el: $('#uploadGarmin'),currentAthleteId: 1,deviceView: garminDeviceView,garminHostKeys: [["http://app.strava.com","4404618db74ce0651b9adc0ac81993ce"],["http://www.strava.com","24d77c9983b017543e8050b79eafad89"],["http://strava.com","b8a2037a6254b296d107d97277c92845"],["http://app.dev.strava.com","5f49363b279bb0caac63201080f2f4fa"],["http://dev.strava.com","509ee0961b3dea0cc24e19cafff5fc52"],["http://www.dev.strava.com","4617909f55f77fbcd4cae0eb8579bb93"]],dateFormat: 'mm/dd/yy'});
garminPluginView['checkDeviceSupport'] = function(device) {var gd = new Strava.Uploads.GarminDevice(device);console.log("description string: " + gd.descriptionString);if (gd.type == gd.EDGE && gd.number == gd.EDGE_500 && this.pluginController.pluginVersion() < this.MIN_VERSION_NUMBER) {console.log("- need to update plugin: " + this.pluginController.pluginVersion() + " < " + this.MIN_VERSION_NUMBER);false;} else if (!gd.number || !gd.type) {console.log("- device not recognized: " + gd.number + " " + gd.type);false;} else {true;}};
garminPluginView.startFlow();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment