This commit is contained in:
Valentin Boettcher 2019-06-26 11:39:45 +02:00
parent 76ca2e68fa
commit 3fdbf78fcf
2 changed files with 8 additions and 8 deletions

View file

@ -8,9 +8,9 @@ the [[http://www.gigamonkeys.com/book/][online version]] of Practical Common Lis
- syntax highlighting - syntax highlighting
- table of contents - table of contents
- quick-nav: - quick-nav:
- =right-arrow-key= - next chapter - =n= - next chapter
- =left-arrow-key= - previous chapter - =p= - previous chapter
- =HOME/POS1= - index page - =h= - index page
- footnote popvers - footnote popvers
** TODO ** TODO
@ -20,3 +20,4 @@ the [[http://www.gigamonkeys.com/book/][online version]] of Practical Common Lis
** Credits ** Credits
- syntax highlighting: [[https://github.com/orthecreedence/highlight-lisp][highlight-lisp]] - syntax highlighting: [[https://github.com/orthecreedence/highlight-lisp][highlight-lisp]]
- Table of Contents: [[https://tscanlin.github.io/tocbot/][Tocbot]] - Table of Contents: [[https://tscanlin.github.io/tocbot/][Tocbot]]
- Tooltips: [[https://github.com/atomiks/tippyjs][Tippy]]

View file

@ -87,14 +87,14 @@ function gotoNext() {
// set up the navigation shortcuts // set up the navigation shortcuts
function setUpNav() { function setUpNav() {
document.addEventListener('keypress', (event) => { document.addEventListener('keypress', (event) => {
switch(event.keyCode) { switch(event.key) {
case 37: case 'p':
goToPrevious(); goToPrevious();
break; break;
case 39: case 'n':
gotoNext(); gotoNext();
break; break;
case 36: case 'h':
document.location.href = 'index.html'; document.location.href = 'index.html';
break; break;
} }
@ -163,7 +163,6 @@ function linkFootnotes() {
// Let's apply that stuff. // Let's apply that stuff.
loadChapters().then(newChapters => { loadChapters().then(newChapters => {
console.log(newChapters);
chapters = newChapters; chapters = newChapters;
setUpNumbering(); setUpNumbering();
}); });