]> git.wh0rd.org Git - tt-rss.git/commitdiff
add hotkey for toggling VFEED_GROUP_BY_FEED preference
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 26 Jul 2016 12:55:00 +0000 (15:55 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 26 Jul 2016 12:55:00 +0000 (15:55 +0300)
include/functions2.php
js/tt-rss.js

index 0a4f4309ee2dacb8df786ebe6dfa6a21eb095cde..aab73d34291f61ab4ca903723734623fdfe6e947 100644 (file)
@@ -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"),
                                "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",
index 2f738810b4e6a893d4631df6299dc3d2b0a1fdbf..108b65a7fec0a4a1886c9dc0064d711205a2af7c 100644 (file)
@@ -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();
                };