Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an average button #1

Open
pmcelhaney opened this issue Nov 1, 2013 · 0 comments
Open

Add an average button #1

pmcelhaney opened this issue Nov 1, 2013 · 0 comments

Comments

@pmcelhaney
Copy link

As long as the cards aren't too far off, we take the average and use that as an estimate.

It would be great if the app calculated the average automatically. Will send a pull request when I get a chance. For now, here's a snippet of code I just threw together than can be pasted in the console.

var cards = $('.cards > div > div'); alert('Average is ' + Math.round(cards.reduce(function (a, b) { return {innerText: (+a.innerText||0) + (+b.innerText||0)}; }).innerText / cards.length))

PS - Thank you for making this app. Very well done and useful!

richarcher pushed a commit that referenced this issue Aug 30, 2016
Merge branch 'add-sd-to-average'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant