Created
June 19, 2017 17:23
-
-
Save gregglind/92b612ec9cd603f29a3397f9c1ff45c9 to your computer and use it in GitHub Desktop.
Getting Lap Data out of Strava
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
window.NodeList.prototype.map = Array.prototype.map; | |
function floatTime (s) { f=s.split(':').map(Number); return f[0] + f[1]/60} | |
console.log(document.querySelectorAll('.mile-splits tbody tr').map(node=>node.querySelector('td:nth-child(2)').firstChild.data).map(floatTime).join("\n")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment