mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add keyboard shortcut to jump to an item's feed page
This commit is contained in:
parent
7da72cf89a
commit
93f90dae68
6 changed files with 21 additions and 9 deletions
File diff suppressed because one or more lines are too long
|
@ -390,13 +390,24 @@ function goToNext() {
|
|||
}
|
||||
|
||||
function goToFeedOrFeeds() {
|
||||
if (isEntry()) {
|
||||
goToFeed();
|
||||
} else {
|
||||
goToPage('feeds');
|
||||
}
|
||||
}
|
||||
|
||||
function goToFeed() {
|
||||
if (isEntry()) {
|
||||
let feedAnchor = document.querySelector("span.entry-website a");
|
||||
if (feedAnchor !== null) {
|
||||
window.location.href = feedAnchor.href;
|
||||
}
|
||||
} else {
|
||||
goToPage('feeds');
|
||||
let currentItemFeed = document.querySelector(".current-item a[data-feed-link]");
|
||||
if (currentItemFeed !== null) {
|
||||
window.location.href = currentItemFeed.getAttribute("href");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
1
ui/static/js/bootstrap.js
vendored
1
ui/static/js/bootstrap.js
vendored
|
@ -27,6 +27,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
keyboardHandler.on("s", () => handleSaveEntry());
|
||||
keyboardHandler.on("d", () => handleFetchOriginalContent());
|
||||
keyboardHandler.on("f", () => handleBookmark());
|
||||
keyboardHandler.on("F", () => goToFeed());
|
||||
keyboardHandler.on("R", () => handleRefreshAllFeeds());
|
||||
keyboardHandler.on("?", () => showKeyboardShortcuts());
|
||||
keyboardHandler.on("#", () => unsubscribeFromFeed());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue