From 84cf95fe8f1bf9df1a31811e13994114aaa3be2a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 7 Mar 2019 11:52:10 +0300 Subject: [PATCH] Headlines.click: open original article when it makes sense to do so --- js/Headlines.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/Headlines.js b/js/Headlines.js index f15d68f0e..f161a6bea 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -171,11 +171,17 @@ define(["dojo/_base/declare"], function (declare) { if (Article.getActive() != id) { Article.setActive(id); - if (!App.getInitParam("cdm_expanded")) + if (App.getInitParam("cdm_expanded")) { + Article.openInNewWindow(id); + Headlines.toggleUnread(id, 0); + } else { Article.cdmScrollToId(id); + } } else if (in_body) { Headlines.toggleUnread(id, 0); + } else { + Article.openInNewWindow(id); } return in_body;