summaryrefslogtreecommitdiff
path: root/plugins/googlereaderkeys
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-12 11:35:41 +0400
committerAndrew Dolgov <[email protected]>2013-03-12 11:35:41 +0400
commit3afc03b5308ab93e811fdeca6fd2a3c54ac8bbd8 (patch)
treee1943da3f86d9d581c8a138da7c637dc6925fe62 /plugins/googlereaderkeys
parent0b5ef30d69e0099c3e843388c93077433b6ce0a1 (diff)
add plugins/googlereaderkeys
Diffstat (limited to 'plugins/googlereaderkeys')
-rw-r--r--plugins/googlereaderkeys/init.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/googlereaderkeys/init.php b/plugins/googlereaderkeys/init.php
new file mode 100644
index 000000000..769581908
--- /dev/null
+++ b/plugins/googlereaderkeys/init.php
@@ -0,0 +1,34 @@
+<?php
+class GoogleReaderKeys extends Plugin {
+
+ private $link;
+ private $host;
+
+ function about() {
+ return array(1.0,
+ "Keyboard hotkeys like Google Reader",
+ "markwaters");
+ }
+
+ function init($host) {
+ $this->link = $host->get_link();
+ $this->host = $host;
+
+ $host->add_hook($host::HOOK_HOTKEY_MAP, $this);
+ }
+
+ function hook_hotkey_map($hotkeys) {
+
+ $hotkeys["j"] = "next_article_noscroll";
+ $hotkeys["N"] = "next_feed";
+ $hotkeys["k"] = "prev_article_noscroll";
+ $hotkeys["P"] = "prev_feed";
+ $hotkeys["v"] = "open_in_new_window";
+ $hotkeys["(32)|space"] = "next_article";
+ $hotkeys["r"] = "feed_refresh";
+
+ return $hotkeys;
+
+ }
+}
+?>