diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index 23d9976bcb5804d214a0aad7466191e93f331d64..839785f7aa9ec472fc3177b96da88496049190ab 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -1,4 +1,4 @@ -:: Encyclopedia [nobr jump-from-safe] +:: Encyclopedia [nobr no-history] <<if $encyclopedia !== "Table of Contents">> <<= App.Encyclopedia.Dialog.linkSC("Table of Contents", "Table of Contents")>> diff --git a/src/gui/quicklinks.js b/src/gui/quicklinks.js index bf25ccf4024ed9096f2b23bc56668eea629b675e..85c83e8845dc97de3968304c4af413934961573e 100644 --- a/src/gui/quicklinks.js +++ b/src/gui/quicklinks.js @@ -7,6 +7,7 @@ App.UI.quickMenu = (function() { // setup safe passages const jumpFrom = Story.lookup("tags", "jump-from-safe").map(passage => passage.title); const jumpTo = Story.lookup("tags", "jump-to-safe").map(passage => passage.title); + 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. // Only two values are allowed: true or an object following the same rules @@ -75,8 +76,10 @@ App.UI.quickMenu = (function() { $(document).on(':passageinit', event => { // if navigated here normally, add passage to history, otherwise remove last entry from history if (!historyNavigation) { - if (State.passage === event.passage.title) { - // only reloaded passage + if (State.passage === event.passage.title // reloaded + || noHistory.includes(State.passage) // came from a no-history passage + || noHistory.includes(event.passage.title) // no history for this passage + ) { return; } // if last passage can be jumped to add passage to history, otherwise clear history