summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-02-18 16:05:35 +0300
committerAndrew Dolgov <[email protected]>2010-02-18 16:05:35 +0300
commit8a3e0b1aa6b60043ab1206458df6413bba2d9e89 (patch)
tree062c229686099b84e5d6d161b282b0262603b998 /tt-rss.js
parentfdf47b9d1c338903c4c69ec53a70d717ae135f77 (diff)
add hotkey (f x) to reverse headlines order (closes #262)
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 81a40f211..4b463cf3b 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -1251,6 +1251,10 @@ function hotkey_handler(e) {
return;
}
+ if (keycode == 88) { // x
+ reverseHeadlineOrder();
+ return;
+ }
}
/* Prefix c */
@@ -1364,3 +1368,19 @@ function feedsSortByUnread() {
function inPreferences() {
return false;
}
+
+function reverseHeadlineOrder() {
+ try {
+
+ var query_str = "?op=rpc&subop=togglepref&key=REVERSE_HEADLINES";
+
+ new Ajax.Request("backend.php", {
+ parameters: query_str,
+ onComplete: function(transport) {
+ viewCurrentFeed();
+ } });
+
+ } catch (e) {
+ exception_error("reverseHeadlineOrder", e);
+ }
+}