Revert "add navigator script"

This reverts commit 61c27e930e.
This commit is contained in:
Lorenzo Lewis
2023-07-30 01:47:58 +01:00
parent 61c27e930e
commit 9e4241e1bd
2 changed files with 0 additions and 33 deletions

View File

@@ -1,27 +0,0 @@
(function chapterNavigation() {
document.addEventListener('keydown', function (e) {
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
return;
}
if (window.search && window.search.hasFocus()) {
return;
}
switch (e.key) {
case 'ArrowRight':
e.preventDefault();
var nextButton = document.querySelector('a[rel="next"]');
if (nextButton) {
window.location.href = nextButton.href;
}
break;
case 'ArrowLeft':
e.preventDefault();
var previousButton = document.querySelector('a[rel="prev"]');
if (previousButton) {
window.location.href = previousButton.href;
}
break;
}
});
})();