add hotkey for toggling VFEED_GROUP_BY_FEED preference

This commit is contained in:
Andrew Dolgov 2016-07-26 15:55:00 +03:00
parent 76ba1df76e
commit 64c24ecb59
2 changed files with 12 additions and 0 deletions

View File

@ -89,6 +89,7 @@
"feed_edit" => __("Edit feed"), "feed_edit" => __("Edit feed"),
"feed_catchup" => __("Mark as read"), "feed_catchup" => __("Mark as read"),
"feed_reverse" => __("Reverse headlines"), "feed_reverse" => __("Reverse headlines"),
"feed_toggle_vgroup" => __("Toggle headline grouping"),
"feed_debug_update" => __("Debug feed update"), "feed_debug_update" => __("Debug feed update"),
"feed_debug_viewfeed" => __("Debug viewfeed()"), "feed_debug_viewfeed" => __("Debug viewfeed()"),
"catchup_all" => __("Mark all feeds as read"), "catchup_all" => __("Mark all feeds as read"),
@ -158,6 +159,7 @@
"f e" => "feed_edit", "f e" => "feed_edit",
"f q" => "feed_catchup", "f q" => "feed_catchup",
"f x" => "feed_reverse", "f x" => "feed_reverse",
"f g" => "feed_toggle_vgroup",
"f *d" => "feed_debug_update", "f *d" => "feed_debug_update",
"f *g" => "feed_debug_viewfeed", "f *g" => "feed_debug_viewfeed",
"f *c" => "toggle_combined_mode", "f *c" => "toggle_combined_mode",

View File

@ -441,6 +441,16 @@ function init() {
hotkey_actions["feed_reverse"] = function() { hotkey_actions["feed_reverse"] = function() {
reverseHeadlineOrder(); 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() { hotkey_actions["catchup_all"] = function() {
catchupAllFeeds(); catchupAllFeeds();
}; };