mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Use V to open original link in current tab
- To avoid a breaking change, keep v to open the original link in new tab. - People who prefers to open the link in the current tab should use V.
This commit is contained in:
parent
a96e966911
commit
6291b59849
17 changed files with 56 additions and 30 deletions
|
@ -282,10 +282,14 @@ function handleFetchOriginalContent() {
|
|||
request.execute();
|
||||
}
|
||||
|
||||
function openOriginalLink() {
|
||||
function openOriginalLink(openLinkInCurrentTab) {
|
||||
let entryLink = document.querySelector(".entry h1 a");
|
||||
if (entryLink !== null) {
|
||||
window.location.href = entryLink.getAttribute("href");
|
||||
if (openLinkInCurrentTab) {
|
||||
window.location.href = entryLink.getAttribute("href");
|
||||
} else {
|
||||
DomHelper.openNewTab(entryLink.getAttribute("href"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
1
ui/static/js/bootstrap.js
vendored
1
ui/static/js/bootstrap.js
vendored
|
@ -19,6 +19,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
keyboardHandler.on("l", () => goToPage("next"));
|
||||
keyboardHandler.on("o", () => openSelectedItem());
|
||||
keyboardHandler.on("v", () => openOriginalLink());
|
||||
keyboardHandler.on("V", () => openOriginalLink(true));
|
||||
keyboardHandler.on("m", () => handleEntryStatus());
|
||||
keyboardHandler.on("A", () => markPageAsRead());
|
||||
keyboardHandler.on("s", () => handleSaveEntry());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue