Added result options to commandline

This commit is contained in:
decaf 2020-11-08 22:21:48 -06:00
parent ec41c63f49
commit 01be6603d0

View file

@ -614,6 +614,44 @@ let commands = {
window.open("https://discord.gg/monkeytype");
},
},
{
id: "repeatTest",
display: "Repeat test",
exec: () => {
if (resultVisible) {
restartTest(true);
}
},
},
{
id: "practiceMissedWords",
display: "Practice missed words",
exec: () => {
if (Object.keys(missedWords).length > 0) {
initPractiseMissedWords();
} else {
showNotification("You haven't missed any words.", 2000);
}
},
},
{
id: "toggleWordHistory",
display: "Toggle word history",
exec: () => {
if (resultVisible) {
toggleResultWordsDisplay();
}
},
},
{
id: "saveScreenshot",
display: "Save screenshot",
exec: () => {
if (resultVisible) {
copyResultToClipboard();
}
},
},
],
};