summaryrefslogtreecommitdiff
path: root/js/tt-rss.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r--js/tt-rss.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js
index fca9dac19..e29580c8a 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -335,7 +335,11 @@ function init_hotkey_actions() {
scrollArticle(-40);
};
hotkey_actions["close_article"] = function() {
- closeArticlePanel();
+ if (isCdmMode()) {
+ cdmCollapseActive();
+ } else {
+ closeArticlePanel();
+ }
};
hotkey_actions["email_article"] = function() {
if (typeof emailArticle != "undefined") {
@@ -501,6 +505,20 @@ function init_hotkey_actions() {
viewCurrentFeed();
})
};
+ hotkey_actions["toggle_cdm_expanded"] = function() {
+ notify_progress("Loading, please wait...");
+
+ const value = getInitParam("cdm_expanded") ? "false" : "true";
+ const query = "?op=rpc&method=setpref&key=CDM_EXPANDED&value=" + value;
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ setInitParam("cdm_expanded", !getInitParam("cdm_expanded"));
+ viewCurrentFeed();
+ } });
+ };
+
}
function init_second_stage() {