mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-07 16:05:12 +08:00
storing element to increase performance
This commit is contained in:
parent
90534a787e
commit
1c95e775a9
1 changed files with 5 additions and 2 deletions
|
|
@ -1,6 +1,9 @@
|
|||
import Config from "./config";
|
||||
import * as TestLogic from "./test-logic";
|
||||
|
||||
let liveWpmElement = document.querySelector("#liveWpm");
|
||||
let miniLiveWpmElement = document.querySelector("#miniTimerAndLiveWpm .wpm");
|
||||
|
||||
export function update(wpm, raw) {
|
||||
// if (!TestLogic.active || !Config.showLiveWpm) {
|
||||
// hideLiveWpm();
|
||||
|
|
@ -14,8 +17,8 @@ export function update(wpm, raw) {
|
|||
if (Config.alwaysShowCPM) {
|
||||
number = Math.round(number * 5);
|
||||
}
|
||||
document.querySelector("#miniTimerAndLiveWpm .wpm").innerHTML = number;
|
||||
document.querySelector("#liveWpm").innerHTML = number;
|
||||
miniLiveWpmElement.innerHTML = number;
|
||||
liveWpmElement.innerHTML = number;
|
||||
}
|
||||
|
||||
export function show() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue