Add overall lesson timing to video listings on Coursera

Marché de La Rochelle HDR
Marché de La Rochelle HDR 
Probably about two years ago - when taking Andrew Ng's excellent "Machine Learning" MOOC, Johannes sent me a piece of JavaScript that populated the video lists with overall time per lesson just by pasting it into the URL-thingy in Chrome. Magic. Today when I sat down to start the course on "General Game Playing" that I have signed up for, but, alas, not (yet) found much time for, I thought of that piece of code and wondered if I, with my new knowledge of JavaScript, could whip up something like that. (Also I couldn't find Johannes' original one.)

I quickly hacked together something this afternoon over a flat white in a hipster cafe here in Lyon. And lo and behold it worked. Then I extended the functionality to also show minutes and seconds of unwatched video - as well as total overall counters for the entire course. Now each lesson heading reads "Lesson N - Name [time remaining/total time]" instead of just "Lesson N - Name". (The gist of it.)

Having done that I wondered how difficult it would be to make it into a Chrome extension that would just automagically run this script on all my, and maybe other's, Coursera video listings. That (seems to have gone|went) fairly well and the extension can be installed from here: https://chrome.google.com/webstore/detail/coursera-video-time-summa/gncpkgpieinlhlcemphffhkleahblekl

Now back to the General Game Playing...