Skip to content

Commit

Permalink
Calculate for both regular and hidden efforts (Closes: #36)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
  • Loading branch information
lamby committed Oct 27, 2015
1 parent 7a6c49e commit c9a9032
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/injected.js
Expand Up @@ -899,8 +899,14 @@ function StravaEnhancementSuite($, options) {
var data = {};
var elevation_unit = null;

// Calculate for both regular and hidden efforts
var efforts = $.merge(
pageView.segmentEfforts().models
, pageView.segmentEfforts().hiddenSegmentEfforts
);

// Find total raw times by segment ID
$.each(pageView.segmentEfforts().models, function() {
$.each(efforts, function() {
var segment_id = this.attributes.segment_id;

var m_distance = this.attributes.distance.match(/^([\d\.]+)(.*)/);
Expand Down

0 comments on commit c9a9032

Please sign in to comment.