From 69b9de1cc78036bfc85c17c9fa336ad9d9507ea7 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 11 Jan 2021 20:16:00 +0000 Subject: [PATCH] added some elements to make premid integration a bit easier --- src/js/script.js | 16 ++++++++++++++++ static/index.html | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/js/script.js b/src/js/script.js index b738ba302..f880c95c6 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -2683,6 +2683,7 @@ function startTest() { const delay = expectedStepEnd - performance.now(); timer = setTimeout(function () { time++; + $(".pageTest #premidSecondsLeft").text(config.time - time); if (config.mode === "time") { updateTimer(); } @@ -2898,6 +2899,21 @@ function restartTest(withSameWordset = false, nosave = false) { document.querySelector("#liveWpm").innerHTML = "0"; document.querySelector("#liveAcc").innerHTML = "100%"; + let mode2 = ""; + if (config.mode === "time") { + mode2 = config.time; + } else if (config.mode === "words") { + mode2 = config.words; + } else if (config.mode === "custom") { + mode2 = "custom"; + } else if (config.mode === "quote") { + mode2 = randomQuote.id; + } + $(".pageTest #premidTestMode").text( + `${config.mode} ${mode2} ${config.language}` + ); + $(".pageTest #premidSecondsLeft").text(config.time); + if (activeFunBox === "layoutfluid") { setLayout("qwerty"); settingsGroups.layout.updateButton(); diff --git a/static/index.html b/static/index.html index 1b37bc986..206a450f3 100644 --- a/static/index.html +++ b/static/index.html @@ -1220,6 +1220,8 @@ + +