To match the Open in JOSM feature I added a second button to open the heatmap in iD. I also added a button to toggle the tms: prefix to give flexibility when manually copying the url.
To accommodate these I did a fair amount of refactoring:
Changed the namespace prefix of class names from josm- to jsh- since the this extension clearly isn't just for JOSM users despite the (poorly chosen) name JOSM Strava Heatmap.
Reworked variable and function naming to not be so JOSM centric
Restructured functions for better error handling (when user isn't logged in to Strava or cookies are missing for some reason)
Added docblock comments to better explain each function's purpose
@dericke please feel free to give this a review to make sure I didn't inadvertently break anything from your PR. Once this is merged I'll do a release for version 4 and submit to the Chrome Web Store and Mozilla Addons.
To match the Open in JOSM feature I added a second button to open the heatmap in iD. I also added a button to toggle the
tms:
prefix to give flexibility when manually copying the url.To accommodate these I did a fair amount of refactoring:
josm-
tojsh-
since the this extension clearly isn't just for JOSM users despite the (poorly chosen) name JOSM Strava Heatmap.@dericke please feel free to give this a review to make sure I didn't inadvertently break anything from your PR. Once this is merged I'll do a release for version 4 and submit to the Chrome Web Store and Mozilla Addons.