summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/functions.php4
-rw-r--r--js/tt-rss.js13
2 files changed, 16 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 030d8d50e..36d349b54 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1938,7 +1938,8 @@
"feed_debug_update" => __("Debug feed update"),
"catchup_all" => __("Mark all feeds as read"),
"cat_toggle_collapse" => __("Un/collapse current category"),
- "toggle_combined_mode" => __("Toggle combined mode")),
+ "toggle_combined_mode" => __("Toggle combined mode"),
+ "toggle_cdm_expanded" => __("Toggle auto expand in combined mode")),
__("Go to") => array(
"goto_all" => __("All articles"),
"goto_fresh" => __("Fresh"),
@@ -2002,6 +2003,7 @@
"f x" => "feed_reverse",
"f *d" => "feed_debug_update",
"f *c" => "toggle_combined_mode",
+ "f c" => "toggle_cdm_expanded",
"*q" => "catchup_all",
"x" => "cat_toggle_collapse",
// "goto" => array(
diff --git a/js/tt-rss.js b/js/tt-rss.js
index d38b203c1..cb7c0ab2d 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -483,6 +483,19 @@ function init() {
window.location.reload();
} });
};
+ hotkey_actions["toggle_cdm_expanded"] = function() {
+ notify_progress("Loading, please wait...");
+
+ var value = getInitParam("cdm_expanded") ? "false" : "true";
+ var 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();
+ } });
+ };
} catch (e) {