Created
January 22, 2015 21:31
-
-
Save kortina/78e282f40e947c0e78a7 to your computer and use it in GitHub Desktop.
dumb-read-time.js
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 words = document.body.innerText.trim().replace(/\s+/gi, ' ').split(' ').length; | |
var avgwpm = 275; /* 275 words per min avg adult read speed */ | |
console.log(words.toString() + " words / " + Math.round(words/avgwpm).toString() + " min read"); | |
/* ref: https://medium.com/the-story/read-time-and-you-bc2048ab620c */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment