add ability to go to prev post
parent
621b7d5fa0
commit
084b9cdcbb
|
@ -21,12 +21,14 @@ if (post_permalinks) {
|
|||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (
|
||||
["d", "ArrowRight"].includes(e.key) &&
|
||||
!["TEXTAREA", "INPUT"].includes(document.activeElement.tagName) &&
|
||||
!(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) &&
|
||||
!expandImageModal.classList.contains('show')
|
||||
) {
|
||||
location.href = permalink_after.slice(1, -1)
|
||||
if (["ArrowRight", "d"].includes(e.key))
|
||||
location.href = permalink_after.slice(1, -1)
|
||||
if (["ArrowLeft", "a"].includes(e.key))
|
||||
history.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue