From 4a4d7a44faf0ba8d02a8a33a1a6c740a06305798 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 24 Jan 2020 16:04:12 +0300 Subject: [PATCH] onViewModeChanged: set view mode value as a custom body attribute --- js/tt-rss.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/tt-rss.js b/js/tt-rss.js index 84e42bf85..a3c371edb 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -197,6 +197,10 @@ require(["dojo/_base/kernel", document.title = tmp; }, onViewModeChanged: function() { + const view_mode = document.forms["toolbar-main"].view_mode.value; + + $$("body")[0].setAttribute("view-mode", view_mode); + return Feeds.reloadCurrent(''); }, isCombinedMode: function() {