Created
September 30, 2018 23:09
-
-
Save adil1214/b3b6d0cccf42f1c5b50968e16536c932 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
| /* | |
| // egghead playlist | |
| // https://egghead.io/courses/advanced-react-component-patterns | |
| */ | |
| let a = 0; | |
| [...document.getElementsByClassName('w-100 pa1 tl mv0 flex flex-row items-center no-underline dark-gray h2')] | |
| .map((e) => e.innerText ) | |
| .forEach((d) => | |
| a+= (parseInt(d[0])*60 + parseInt(d[2])*10 + parseInt(d[3]) // all vids have less than 10min duration (m:ss) so... | |
| )); | |
| console.log(`${parseInt(a/3600)}:${parseInt(a/60)}:${a%60}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment