mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 06:42:35 +00:00
Revert "Add navigation by keyboard using alt + left/right arrows"
This commit is contained in:
parent
5ffee8144b
commit
f47d420811
2 changed files with 2 additions and 19 deletions
|
@ -23,23 +23,6 @@ $( document ).ready(function() {
|
|||
hljs.highlightBlock(block);
|
||||
});
|
||||
|
||||
var KEY_CODES = {
|
||||
PREVIOUS_KEY: 37,
|
||||
NEXT_KEY: 39
|
||||
};
|
||||
|
||||
$(document).on('keydown', function (e) {
|
||||
if (e.altKey === true) {
|
||||
switch (e.keyCode) {
|
||||
case KEY_CODES.NEXT_KEY:
|
||||
window.location.href = $('.nav-chapters.next').attr('href');
|
||||
break;
|
||||
case KEY_CODES.PREV_KEY:
|
||||
window.location.href = $('.nav-chapters.previous').attr('href');
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Interesting DOM Elements
|
||||
var html = $("html");
|
||||
|
|
|
@ -84,13 +84,13 @@
|
|||
</div>
|
||||
|
||||
{{#previous}}
|
||||
<a href="{{link}}" class="nav-chapters previous" title="Alt + ←">
|
||||
<a href="{{link}}" class="nav-chapters previous">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
{{/previous}}
|
||||
|
||||
{{#next}}
|
||||
<a href="{{link}}" class="nav-chapters next" title="Alt + →">
|
||||
<a href="{{link}}" class="nav-chapters next">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
{{/next}}
|
||||
|
|
Loading…
Reference in a new issue