From 64c24ecb5973adad700612b0ec913b190e8b1e58 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 26 Jul 2016 15:55:00 +0300 Subject: [PATCH] add hotkey for toggling VFEED_GROUP_BY_FEED preference --- include/functions2.php | 2 ++ js/tt-rss.js | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/functions2.php b/include/functions2.php index 0a4f4309..aab73d34 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -89,6 +89,7 @@ "feed_edit" => __("Edit feed"), "feed_catchup" => __("Mark as read"), "feed_reverse" => __("Reverse headlines"), + "feed_toggle_vgroup" => __("Toggle headline grouping"), "feed_debug_update" => __("Debug feed update"), "feed_debug_viewfeed" => __("Debug viewfeed()"), "catchup_all" => __("Mark all feeds as read"), @@ -158,6 +159,7 @@ "f e" => "feed_edit", "f q" => "feed_catchup", "f x" => "feed_reverse", + "f g" => "feed_toggle_vgroup", "f *d" => "feed_debug_update", "f *g" => "feed_debug_viewfeed", "f *c" => "toggle_combined_mode", diff --git a/js/tt-rss.js b/js/tt-rss.js index 2f738810..108b65a7 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -441,6 +441,16 @@ function init() { hotkey_actions["feed_reverse"] = function() { reverseHeadlineOrder(); }; + hotkey_actions["feed_toggle_vgroup"] = function() { + var query_str = "?op=rpc&method=togglepref&key=VFEED_GROUP_BY_FEED"; + + new Ajax.Request("backend.php", { + parameters: query_str, + onComplete: function(transport) { + viewCurrentFeed(); + } }); + + }; hotkey_actions["catchup_all"] = function() { catchupAllFeeds(); }; -- 2.39.5