summaryrefslogtreecommitdiff
path: root/js/Feeds.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-10 08:33:56 +0300
committerAndrew Dolgov <[email protected]>2021-03-10 08:33:56 +0300
commitddfa39015e374f7bee0d5b241391c87752db2dc4 (patch)
tree54fff3b1188e0fe10368f528a18705330df68f14 /js/Feeds.js
parent6ec66d0ce5dd3dc79e72ac562448045526756280 (diff)
experimental: add preference to show combined mode headlines as a 2 column grid
Diffstat (limited to 'js/Feeds.js')
-rw-r--r--js/Feeds.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index b14caeaf9..9e65a06fd 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -321,8 +321,16 @@ const Feeds = {
this._active_feed_id = id;
this._active_feed_is_cat = is_cat;
- App.byId("headlines-frame").setAttribute("feed-id", id);
- App.byId("headlines-frame").setAttribute("is-cat", is_cat ? 1 : 0);
+ const container = App.byId("headlines-frame");
+
+ // TODO @deprecated: these two should be removed (replaced with data- attributes below)
+ container.setAttribute("feed-id", id);
+ container.setAttribute("is-cat", is_cat ? 1 : 0);
+ // ^
+
+ container.setAttribute("data-feed-id", id);
+ container.setAttribute("data-is-cat", is_cat ? "true" : "false");
+ container.setAttribute("data-enable-grid", App.getInitParam("cdm_enable_grid") ? "true" : "false");
this.select(id, is_cat);