1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Add comments link keyboard shortcut

This commit is contained in:
Richard Schneider 2020-01-07 00:02:02 -06:00 committed by Frédéric Guillot
parent e2315e6a54
commit 6ebb29cd22
18 changed files with 84 additions and 20 deletions

View file

@ -304,6 +304,25 @@ function openOriginalLink(openLinkInCurrentTab) {
}
}
function openCommentLink(openLinkInCurrentTab) {
if (!isListView()) {
let entryLink = document.querySelector("a[data-comments-link]");
if (entryLink !== null) {
if (openLinkInCurrentTab) {
window.location.href = entryLink.getAttribute("href");
} else {
DomHelper.openNewTab(entryLink.getAttribute("href"));
}
return;
}
} else {
let currentItemCommentsLink = document.querySelector(".current-item a[data-comments-link]");
if (currentItemCommentsLink !== null) {
DomHelper.openNewTab(currentItemCommentsLink.getAttribute("href"));
}
}
}
function openSelectedItem() {
let currentItemLink = document.querySelector(".current-item .item-title a");
if (currentItemLink !== null) {