Skip to content

Instantly share code, notes, and snippets.

@mlakhia
Last active November 30, 2020 23:24
Show Gist options
  • Save mlakhia/fbf1734b30433303294867517bc8e28b to your computer and use it in GitHub Desktop.
Save mlakhia/fbf1734b30433303294867517bc8e28b to your computer and use it in GitHub Desktop.
Export All GPX Files from AlpineReplay / Trace Snow http://snow.traceup.com/settings/gpx
// Export All GPX Files from AlpineReplay / Trace Snow
// http://snow.traceup.com/settings/gpx
// How to use:
// 1. Login to Traceup.com
// 2. Navigate tohttp://snow.traceup.com/settings/gpx
// 3. open your browser Console
// 4. Paste the below javascript into the console and run
var b = document.querySelector('form[method] input')
var s = document.querySelector('select[name=selected_visit]')
function doSetTimeout(i) {
setTimeout(function(){
console.log('Downloading', i)
if ( i == 0 ) { s.children[0].selected = false;
} else { s.children[i-1].selected = false; }
s.children[i].selected = true;
b.click();
}, i * 3500);
}
for (var i=0; i < s.children.length; i++ ) { doSetTimeout(i); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment