Created
November 15, 2023 03:23
-
-
Save mvark/2670ba308777bfb689d9711504c895dc to your computer and use it in GitHub Desktop.
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
javascript:function e(){const t=200,n=e=>e?e.split(/\s+/).length:0,o=(e,t,n)=>{const o=e/t,r=n/e;return.39*o+11.8*r-15.59},r=()=>window.getSelection().toString().trim()||document.body.innerText.trim(),s=r(),l=n(s),a=Math.ceil(l/t),i=s.split(/[.!?]+/).length,c=s.split(/[aeiouy]+/i).length-1,d=o(l,i,c);alert(`Word Count: ${l}\nReading Time: ${a} min\nReadability Level (Flesch-Kincaid Grade Level): ${d.toFixed(2)}`)}e(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment