aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/static/js/app.js
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-11-29 13:48:56 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-11-29 13:58:47 -0800
commit6291b598495732d0470bbfb2f26c7025d64e7880 (patch)
treeda7aeb2c44e9c7f00a842317882048a0254a6a43 /ui/static/js/app.js
parenta96e966911dd6c57f8b4c4c7ace65a8a4b9d913c (diff)
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.
Diffstat (limited to 'ui/static/js/app.js')
-rw-r--r--ui/static/js/app.js8
1 files changed, 6 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;
}