Created
November 13, 2023 07:36
-
-
Save mvark/97c32d3b8117d138d0858cf176cc4f1d to your computer and use it in GitHub Desktop.
Compact version of Bookmarklet code to calculate Word Count & Estimated Reading Time
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
javascript:(function(wpm = 200){const st = window.getSelection().toString().trim(),tw = st ? st.split(/\s+/).length : document.body.innerText.split(/\s+/).length,et = Math.ceil(tw / wpm);alert(`Word count: ${tw}\nEstimated reading time: ${et} minutes`);})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment