more keyboard shortcuts

This commit is contained in:
rimu 2024-01-20 10:07:23 +13:00
parent 8045b4fad5
commit 7f14dc4bbb

View file

@ -388,8 +388,8 @@ function setupKeyboardShortcuts() {
didSomething = true;
}
} else if (event.key === 'Enter') {
if(document.activeElement.classList.contains('downvote_button') || document.activeElement.classList.contains('upvote_button')) {
document.activeElement.click();
if(currentPost) {
currentPost.querySelector('.post_teaser_title_a').click();
didSomething = true;
}
}