Real time WPM

10FF news, updates and polls.
Post Reply
Alfredoo
Posts: 8
Joined: Tue Feb 27, 2018 2:07 am

Real time WPM

Post by Alfredoo » Fri Mar 02, 2018 7:49 pm

Hi everyone! I heard someone talk about being able to see your current words per minute score (or a prediction) during the test (like in a multiplayer competition), and I wrote this little script that allows you to do that. Enjoy!

Code: Select all

$(function () 
{
    $(document).keydown(function (k) 
    {
        realWPM = Math.round((error_keystrokes / 5) / ((60.01 - countdown) / 60));
        
	if(realWPM < 0 || realWPM > 400)
    	{
        	realWPM = 0;
    	}

        $('#preview').html("<font size='+3'><b>WPM:</b> " + 
        realWPM + "<br><b>Key Strokes:</b> " + 
        error_keystrokes + "<br><b>Words:</b> " + 
        error_correct + "</<font size='+3'>");       
        
        $('#words').before("<div id='preview'></div>");        
    })
})
It's a little bit inaccurate when you get a lot of wrong words, but I actually perform better knowing how well I'm doing.
(To use this press CNTRL + SHIFT + I, click on console, paste the code, press ENTER and start typing!)

//- Fixed: inaccurate scores in the first few seconds.

Screenshot: http://prntscr.com/im0hw6

bORNZOR
Posts: 23
Joined: Tue Nov 06, 2018 4:13 pm

Re: Real time WPM

Post by bORNZOR » Tue Nov 06, 2018 4:28 pm

I just registered today but I use your code alot thank you very much for sharing this method to see realtimespeed!!! I used this alot :)

User avatar
Stephen Athon
Posts: 44
Joined: Wed Feb 19, 2014 5:53 pm

Re: Real time WPM

Post by Stephen Athon » Fri May 01, 2020 7:47 pm

Thank you for this!

Post Reply