Skip to content

Commit

Permalink
feat: better hotkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Dec 2, 2023
1 parent f490747 commit 6ae6b32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"**/dist/": true,
"**/node_modules/": true,
"LICENSE": true,
// @template-customization-start
"**/.docusaurus/": true,
"**/build/": true,
// @template-customization-end
},

// ------------------
Expand Down
6 changes: 6 additions & 0 deletions static/js/hotkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ keyMap.set("l", () => {

const level = parseIntSafe(levelString);
if (level === undefined) {
// eslint-disable-next-line no-alert
window.alert(`"${levelString}" is not a number.`);
return;
}

if (level < 1 || level > MAX_LEVEL) {
// eslint-disable-next-line no-alert
window.alert(
`Level ${level} is not a valid level; levels must be between 1 and ${MAX_LEVEL}.`,
);
return;
}

Expand Down

0 comments on commit 6ae6b32

Please sign in to comment.