Skip to content

Instantly share code, notes, and snippets.

@marguslt
Last active April 21, 2020 13:32
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 marguslt/b0ee7e88960b2d03de2da62a44233893 to your computer and use it in GitHub Desktop.
Save marguslt/b0ee7e88960b2d03de2da62a44233893 to your computer and use it in GitHub Desktop.
Suunto App / Sports-Tracker fit export bookmarklet

Bookmarklet for adding Export FIT links to SportsTracker Dashboard - https://www.sports-tracker.com/dashboard

As of time writing, those files happen to have the same content that Suunto App backend is sending to 3rd party services like Strava & TrainingPeaks screenshot

Bookmarklet link can be found here - https://gistcdn.githack.com/marguslt/b0ee7e88960b2d03de2da62a44233893/raw/bookmarklet-link.html

javascript:(function(){
    const exports = [
        {innerText : 'Export FIT' , urlpart : 'exportFit'},
        {innerText : 'Export GPX' , urlpart : 'exportGpx'}];

    let comment_list = document.querySelectorAll('.comment-list'); 

    for (let i = 0; i< comment_list.length; i++){
        for (let i_exp = 0; i_exp < exports.length; i_exp++){
            let li = document.createElement('li');
            let a = document.createElement('a');
            a.target = '_blank';
            a.href = `https://api.sports-tracker.com/apiserver/v1/workout/${exports[i_exp].urlpart}/${comment_list[i].getAttribute('workout-key')}?token=${window.localStorage.sessionkey}`;
            a.innerText = exports[i_exp].innerText;
            li.appendChild(a);
            comment_list[i].appendChild(li);
        }
    }   
})();

Analytics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment