ear1grey / parkrun-event-summary

A chrome extension that provides an infographic summary when viewing the results page of a parkrun event
2 stars 0 forks source link

Junior Milestones #1

Open markbeech opened 7 months ago

markbeech commented 7 months ago

I have hacked a copy of this to replace the 5K milestones with the Junior parkrun milestones by changing a couple of lines in script.js

meta.milestones.official = { 11: [], 21: [], 50: [], 100: [], 250: []}; and { label: '250', value: meta.milestones.official[250].length, color: '#ffff00' }, { label: '100', value: meta.milestones.official[100].length, color: '#7f7f7f' }, { label: 'ultra marathon', value: meta.milestones.official[50].length, color: '#ffa401' }, { label: 'marathon', value: meta.milestones.official[21].length, color: '#c1cf00' }, { label: 'half marathon', value: meta.milestones.official[11].length, color: '#98d6ec' },

It is beyond me, but I was wondering if it would be possible to have both the 5K and 2K/Jr milestones but switch between them based on the existance of the string -juniors in the URL?