1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +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:
Frédéric Guillot 2019-11-29 13:48:56 -08:00
parent a96e966911
commit 6291b59849
17 changed files with 56 additions and 30 deletions

View file

@ -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;
}