Quickly switching between imperial and metric units on Strava

By Chris Lamb

British triathletes are quite schizophrenic about their units: not "European" enough to bike using metric units yet not "American" enough to run using their imperial counterparts.

Garmin units seem happy enough to accomodate this contradiction but Strava only has a single global setting.

Switching units would normally involve visiting your settings page—inconvenient when viewing lots of run and bike pages—so I wrote a Chrome extension that toggles between the different unit types via a Strava icon in the address bar:

https://chris-lamb.co.uk/wp-content/2013/strava-1.png

I considered a solution that actually converted the values displayed on the page but the illusion would always be shattered by Javascript elements which would require extensive monkey-patching to ensure the desired unit was rendered:

https://chris-lamb.co.uk/wp-content/2013/strava-2.png

Source code is available, which should also serve as a template for similar extensions. If you found this Strava extension useful, you might like my extensions to change the default comparison filter on leaderboards or to estimate your running TSS score.


Chris Lamb is a freelance software developer and the current Debian Project Leader. You can read other posts by me, see software I have written or read more about me. You can also follow me @lolamby.


Tags: Hacks

Planets: ALUG UWCS WUGLUG Debian

Thursday 19th December 2013