Reading time bookmarklet

1 min read

Save this code as a bookmark:

javascript:(function(){var t;if (window.getSelection) t = window.getSelection();else if (document.selection) t = document.selection.createRange();if (t.text != undefined) t = t.text;if(!t || t == ""){ a = document.getElementsByTagName("textarea"); for(i=0; i<a.length; i++) {  if(a[i].selectionStart != undefined && a[i].selectionStart != a[i].selectionEnd) {t = a[i].value.substring(a[i].selectionStart, a[i].selectionEnd);break;} }}if(!t || t == "")alert("please select some text");else alert("Words: "+t.toString().match(/(\S+)/g).length+"\n"+"Estimate: "+Math.round(t.toString().match(/(\S+)/g).length/300)+" minutes");})()

IE Create a bookmark then copy this code into the field for URL.

skitch

How to use:

Highlight text then click the bookmark. It will give you a word count and time estimate based on 300 words per minute. Change the formula if your reading speed is different.

reading-time

Note: I’ve only tested this in Chrome.