diff options
Diffstat (limited to 'ui/static/js')
-rw-r--r-- | ui/static/js/app.js | 8 | ||||
-rw-r--r-- | ui/static/js/bootstrap.js | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ui/static/js/app.js b/ui/static/js/app.js index 8474935..2b32e63 100644 --- a/ui/static/js/app.js +++ b/ui/static/js/app.js @@ -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; } diff --git a/ui/static/js/bootstrap.js b/ui/static/js/bootstrap.js index 9aeb5d5..dd394f0 100644 --- a/ui/static/js/bootstrap.js +++ b/ui/static/js/bootstrap.js @@ -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()); |