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:
parent
e2315e6a54
commit
6ebb29cd22
18 changed files with 84 additions and 20 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue