Created
November 13, 2016 16:13
-
-
Save edtoken/2320549de24893a768a6f6a1df57866f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var time = 0; | |
var index = 15; | |
var index2 = 65.82; | |
var items = document.querySelectorAll('.js-duration strong') | |
for(var i=items.length;i--;){ | |
var value = items[i].innerHTML; | |
var vals = value.split(':'); | |
var minutes = parseInt(vals[1]) * 60 + parseInt(vals[2]) | |
time += minutes; | |
} | |
var value = time / 60 * index; | |
var value2 = value * index2; | |
console.log(value, '|', value2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment