10 fast fingers in ur ass

be 1337

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         10 fast fingers in ur ass
// @version      0.1
// @description  be 1337
// @author       Zeper
// @require https://code.jquery.com/jquery-2.1.1.min.js
// @match        https://10fastfingers.com/typing-test/*
// @match        https://10fastfingers.com/advanced-typing-test/*
// @namespace https://greasyfork.org/users/191481
// ==/UserScript==

var input = document.getElementsByClassName("form-control")["0"];
var btnreload = document.getElementById("reload-btn");
var mots = 0;
var Keystrokes = 0;
var WPM = 0;
var text;
var inputnospace;

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

async function demo() {
    text = document.getElementsByClassName("highlight")["0"];
    inputnospace = input.value.replace(/ /g,'');
    if(inputnospace != text.innerHTML){
        input.value = text.innerHTML;
        mots = mots+1;
        Keystrokes = Keystrokes + (input.value.length+1);
        WPM = Math.round((((Keystrokes)-(input.value.length+1))/5));
        btnreload.innerHTML = "WPM: " +WPM;
        console.clear();
        console.log("Correct words: "+ (mots-1));
        console.log("Keystrokes: "+(Keystrokes-(input.value.length+1)));
        console.log("WPM: "+ (((Keystrokes)-(input.value.length+1))/5));
    }
    await sleep(20);
    demo();
}

input.onclick = function() {
   input.setAttribute("type", "submit");
   demo();
};

btnreload.onclick = function() {
   mots = 0;
   Keystrokes = 0;
   WPM = 0;
};