Created
March 20, 2011 19:48
-
-
Save mohamedmansour/878614 to your computer and use it in GitHub Desktop.
Total number of hours watched on Netflix
This file contains 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 timings = document.querySelectorAll("#rhtable tr > td:nth-of-type(4)"); | |
var totalHours = 0; | |
for (var i = 0; i < timings.length; i++) { | |
var timing = timings[i].innerHTML.split(":"); | |
totalHours += parseFloat(timing[0]) + (parseFloat(timing[1]) / 60) + (parseFloat(timing[1]) / 3600); | |
} | |
alert("Hours watched: " + totalHours); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Visit https://ca.netflix.com/WiViewingActivity?all=true to use the script above as a bookmarklet.