added enable ads to command line

This commit is contained in:
Corey Bergeron 2020-11-03 20:29:47 -05:00
parent 430324619b
commit d8f9a40edd
2 changed files with 40 additions and 1 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "monkeytype",
"version": "1.5.3",
"version": "1.5.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -309,6 +309,15 @@ let commands = {
toggleShowOutOfFocusWarning();
},
},
{
id: "setEnableAds",
display: "Set enable ads...",
subgroup: true,
exec: () => {
currentCommands.push(commandsEnableAds);
showCommandLine();
},
},
{
id: "togglePresetCustomTheme",
display: "Toggle preset/custom theme",
@ -758,6 +767,36 @@ let commandsDifficulty = {
],
};
let commandsEnableAds = {
title: "Set enable ads...",
list: [
{
id: "setEnableAdsOff",
display: "off",
exec: () => {
setEnableAds("off");
showNotification("Don't forget to refresh the page!", 3000);
},
},
{
id: "setEnableAdsOn",
display: "on",
exec: () => {
setEnableAds("on");
showNotification("Don't forget to refresh the page!", 3000);
},
},
{
id: "setEnableMax",
display: "Sellout",
exec: () => {
setEnableAds("max");
showNotification("Don't forget to refresh the page!", 3000);
},
},
],
};
let commandsCaretStyle = {
title: "Change caret style...",
list: [