Skip to content

Commit 678a090

Browse files
committed
Merge pull request #86 from azerupi/revert-85-keys_navigation
Revert "Add navigation by keyboard using alt + left/right arrows"
2 parents 5ffee81 + f47d420 commit 678a090

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/theme/book.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,6 @@ $( document ).ready(function() {
2323
hljs.highlightBlock(block);
2424
});
2525

26-
var KEY_CODES = {
27-
PREVIOUS_KEY: 37,
28-
NEXT_KEY: 39
29-
};
30-
31-
$(document).on('keydown', function (e) {
32-
if (e.altKey === true) {
33-
switch (e.keyCode) {
34-
case KEY_CODES.NEXT_KEY:
35-
window.location.href = $('.nav-chapters.next').attr('href');
36-
break;
37-
case KEY_CODES.PREV_KEY:
38-
window.location.href = $('.nav-chapters.previous').attr('href');
39-
break;
40-
}
41-
}
42-
});
4326

4427
// Interesting DOM Elements
4528
var html = $("html");

src/theme/index.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@
8484
</div>
8585

8686
{{#previous}}
87-
<a href="{{link}}" class="nav-chapters previous" title="Alt + &larr;">
87+
<a href="{{link}}" class="nav-chapters previous">
8888
<i class="fa fa-angle-left"></i>
8989
</a>
9090
{{/previous}}
9191

9292
{{#next}}
93-
<a href="{{link}}" class="nav-chapters next" title="Alt + &rarr;">
93+
<a href="{{link}}" class="nav-chapters next">
9494
<i class="fa fa-angle-right"></i>
9595
</a>
9696
{{/next}}

0 commit comments

Comments
 (0)