diff --git a/src/gui/quicklinks.js b/src/gui/quicklinks.js index 44d689b915cb83dc4f723f483cfbad848d75246f..249817e1f507c3676d0e33afc22a6f8ab6175432 100644 --- a/src/gui/quicklinks.js +++ b/src/gui/quicklinks.js @@ -17,7 +17,7 @@ App.UI.quickMenu = (function() { const noHistory = Story.lookup("tags", "no-history").map(passage => passage.title); // if property name is a passage name, then it's a link, otherwise only text. - // category titles are never links to passages + // category titles are never links to passages // Only two values are allowed: true or an object following the same rules const layout = addOtherCategory({ Main: true, @@ -284,7 +284,7 @@ App.UI.quickMenu = (function() { history.shift(); } }); - App.UI.Hotkeys.add("Back in history", {callback: goBack, combinations: ["backspace"]}); + App.UI.Hotkeys.add("historyBack", {callback: goBack, combinations: ["backspace"], uiName: "Back in history"}); /** * Goes back in history if possible. @@ -307,7 +307,10 @@ App.UI.quickMenu = (function() { const a = document.createElement("a"); a.append("Return"); a.onclick = goBack; - div.append(a, " ", App.UI.DOM.makeElement("span", "[backspace]", "hotkey")); + const hotkey = App.UI.Hotkeys.hotkeys("historyBack"); + if (hotkey !== "") { + div.append(a, " ", App.UI.DOM.makeElement("span", hotkey, "hotkey")); + } // insert at second position linkList.splice(1, 0, div); }