Bookmarklet: Calculate Word Count & Estimated Reading Time
I realized I have too many tabs open because I can't get a sense of how long or complex an online article is and therefore can't finish it in one go.
I took the help of Bard to generate bookmarklet code to show me the Word Count & Estimated Reading Time for the web page I'm on. There are caveats to consider but this simple estimation gives me a rough idea of whether I should read an article right away or bookmark it for later. Here's the commented code followed by the Bookmarklet link you can directly use:
Here's how to use it:
- Create a new bookmark in your browser.
- Edit the bookmark and set the name to something like "Estimated Reading Time".
- Paste the above code into the URL or Location field.
Alternatively drag and drop this link (after checking and adapting the words-per-minute rate) to the Bookmarks bar or Favorites bar in Chrome or Edge to see how it works - Estimated Reading Time
Along with the code that Bard generated, it also provided an image illustration:
In Chrome, you can get your bookmarks synced on all your devices.Limitations of the bookmarklet:
- The bookmarklet counts words based on spaces, so it might not be perfect in all cases (e.g., it won't handle punctuation or special characters).
- There may be cases where text is within an iframe. This code cannot handle that uncommon scenario and is currently ignored. Handling text within iframes adds complexity as we would have to recursively traverse all iframes in the document to collect the text content from each iframe.
Drag and drop this link (after checking and adapting the words-per-minute rate) to the Bookmarks bar or Favorites bar in Chrome or Edge to see all 3 metrics - Reading Level
On a related note, check the Hemingway web app if you're interested in evaluating your own writing.

Comments
Post a Comment