From 900cdbbb3129a40299eb11e11b4cb10d89ec4d7c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 7 Mar 2019 15:40:02 +0300 Subject: [PATCH] Headlines.click: open original article (and mark as read) on alt click on title --- js/Headlines.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/js/Headlines.js b/js/Headlines.js index 4b7e7b0c7..3c5ab2ee6 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -168,7 +168,12 @@ define(["dojo/_base/declare"], function (declare) { } else { if (App.isCombinedMode()) { - if (Article.getActive() != id) { + if (event.altKey && !in_body) { + + Article.openInNewWindow(id); + Headlines.toggleUnread(id, 0); + + } else if (Article.getActive() != id) { Headlines.select('none'); Article.setActive(id); @@ -184,14 +189,19 @@ define(["dojo/_base/declare"], function (declare) { } else if (in_body) { Headlines.toggleUnread(id, 0); - } else { + } else { /* !in body */ Article.openInNewWindow(id); } return in_body; } else { - Headlines.select('none'); - Article.view(id); + if (event.altKey) { + Article.openInNewWindow(id); + Headlines.toggleUnread(id, 0); + } else { + Headlines.select('none'); + Article.view(id); + } } }