diff --git a/README.org b/README.org index 0680f26..7aa886a 100644 --- a/README.org +++ b/README.org @@ -8,9 +8,9 @@ the [[http://www.gigamonkeys.com/book/][online version]] of Practical Common Lis - syntax highlighting - table of contents - quick-nav: - - =right-arrow-key= - next chapter - - =left-arrow-key= - previous chapter - - =HOME/POS1= - index page + - =n= - next chapter + - =p= - previous chapter + - =h= - index page - footnote popvers ** TODO @@ -20,3 +20,4 @@ the [[http://www.gigamonkeys.com/book/][online version]] of Practical Common Lis ** Credits - syntax highlighting: [[https://github.com/orthecreedence/highlight-lisp][highlight-lisp]] - Table of Contents: [[https://tscanlin.github.io/tocbot/][Tocbot]] + - Tooltips: [[https://github.com/atomiks/tippyjs][Tippy]] diff --git a/js/main.js b/js/main.js index 7a86553..535403e 100644 --- a/js/main.js +++ b/js/main.js @@ -87,14 +87,14 @@ function gotoNext() { // set up the navigation shortcuts function setUpNav() { document.addEventListener('keypress', (event) => { - switch(event.keyCode) { - case 37: + switch(event.key) { + case 'p': goToPrevious(); break; - case 39: + case 'n': gotoNext(); break; - case 36: + case 'h': document.location.href = 'index.html'; break; } @@ -163,7 +163,6 @@ function linkFootnotes() { // Let's apply that stuff. loadChapters().then(newChapters => { - console.log(newChapters); chapters = newChapters; setUpNumbering(); });