add plugins/googlereaderkeys

This commit is contained in:
Andrew Dolgov 2013-03-12 11:35:41 +04:00
parent 0b5ef30d69
commit 3afc03b530
1 changed files with 34 additions and 0 deletions

View File

@ -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;
}
}
?>