restore keyboard post navigation
parent
80c0ed3959
commit
10e5e0c841
|
@ -18,6 +18,16 @@ if (post_permalinks) {
|
||||||
btn.classList.remove('d-none')
|
btn.classList.remove('d-none')
|
||||||
btn.href = permalink_after.slice(1, -1)
|
btn.href = permalink_after.slice(1, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('keydown', (e) => {
|
||||||
|
if (
|
||||||
|
["d", "ArrowRight"].includes(e.key) &&
|
||||||
|
!["TEXTAREA", "INPUT"].includes(document.activeElement.tagName) &&
|
||||||
|
!(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
||||||
|
) {
|
||||||
|
location.href = permalink_after.slice(1, -1)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue