diff --git a/static/js/hotkey.js b/static/js/hotkey.js index ab90be82ee..764116fd21 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -75,11 +75,19 @@ function navigateForwards() { function goToSpecificLevel() { // eslint-disable-next-line no-alert - const levelString = prompt("Enter the level that you want to go to:"); + const levelString = prompt( + "Enter the level that you want to go to (or p for the learning path):", + ); if (levelString === null || levelString === "") { return; } + // "p" is short for "Learning Path". + if (levelString.toLowerCase() === "p") { + globalThis.location.href = "/learning-path/"; + return; + } + const level = parseIntSafe(levelString); if (level === undefined) { // eslint-disable-next-line no-alert