Skip to content

Commit

Permalink
Always add sauce's export gpx option
Browse files Browse the repository at this point in the history
Apparently some folks like it better than the native one.

Fixes #154
  • Loading branch information
mayfield committed Oct 19, 2024
1 parent 3ade5b1 commit 1ac6e23
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/site/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1534,16 +1534,14 @@ sauce.ns('analysis', ns => {
const laps = await getLaps();
exportActivity('fit', {laps}).catch(console.error);
});
if (!$menu.find('a[href$="/export_gpx"]').length) {
$menu.find('.sauce-group ul').append(jQuery(`
<li><a title="NOTE: GPX files do not support power data (watts)."
class="gpx">${exportLocale} GPX</a></li>
`));
$menu.find('a.gpx').on('click', async () => {
const laps = await getLaps();
exportActivity('gpx', {laps}).catch(console.error);
});
}
$menu.find('.sauce-group ul').append(jQuery(`
<li><a title="NOTE: GPX files do not support power data (watts)."
class="gpx">${exportLocale} GPX</a></li>
`));
$menu.find('a.gpx').on('click', async () => {
const laps = await getLaps();
exportActivity('gpx', {laps}).catch(console.error);
});
}


Expand Down

0 comments on commit 1ac6e23

Please sign in to comment.