mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-02 20:08:18 +08:00
added layout fluid countdown
This commit is contained in:
parent
e92b68bc3a
commit
496b66e4df
1 changed files with 20 additions and 0 deletions
|
@ -1961,6 +1961,26 @@ function startTest() {
|
|||
const layouts = ["qwerty", "dvorak", "colemak"];
|
||||
let index = 0;
|
||||
index = Math.floor(time / (config.time / 3));
|
||||
|
||||
if (
|
||||
time == Math.floor(config.time / 3) - 3 ||
|
||||
time == (config.time / 3) * 2 - 3
|
||||
) {
|
||||
showNotification("3", 1000);
|
||||
}
|
||||
if (
|
||||
time == Math.floor(config.time / 3) - 2 ||
|
||||
time == Math.floor(config.time / 3) * 2 - 2
|
||||
) {
|
||||
showNotification("2", 1000);
|
||||
}
|
||||
if (
|
||||
time == Math.floor(config.time / 3) - 1 ||
|
||||
time == Math.floor(config.time / 3) * 2 - 1
|
||||
) {
|
||||
showNotification("1", 1000);
|
||||
}
|
||||
|
||||
if (config.layout !== layouts[index] && layouts[index] !== undefined) {
|
||||
showNotification(`--- !!! ${layouts[index]} !!! ---`, 3000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue