summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-10 10:01:22 +0300
committerAndrew Dolgov <[email protected]>2021-03-10 10:01:22 +0300
commit0b93d8d0137c46ce153ca65fae3e22304cc80009 (patch)
treee5982313d7a47fa16dbdf8303e86bc8af0315373 /js/Headlines.js
parent089fa5ec26abf064416222f9d3404d8b3bd871a6 (diff)
add hotkey to toggle grid view
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index 8f104c951..fce371904 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -383,10 +383,13 @@ const Headlines = {
return this.headlines[id];
},
setCommonClasses: function () {
- App.byId("headlines-frame").removeClassName("cdm");
- App.byId("headlines-frame").removeClassName("normal");
+ const container = App.byId("headlines-frame");
+
+ container.removeClassName("cdm");
+ container.removeClassName("normal");
- App.byId("headlines-frame").addClassName(App.isCombinedMode() ? "cdm" : "normal");
+ container.addClassName(App.isCombinedMode() ? "cdm" : "normal");
+ container.setAttribute("data-enable-grid", App.getInitParam("cdm_enable_grid") ? "true" : "false");
// for floating title because it's placed outside of headlines-frame
App.byId("main").removeClassName("expandable");