2013-03-12 07:35:41 +00:00
|
|
|
<?php
|
|
|
|
class GoogleReaderKeys extends Plugin {
|
|
|
|
|
|
|
|
private $link;
|
|
|
|
private $host;
|
|
|
|
|
|
|
|
function about() {
|
|
|
|
return array(1.0,
|
2013-03-16 11:06:59 +00:00
|
|
|
"Keyboard hotkeys emulate Google Reader",
|
2013-03-12 07:35:41 +00:00
|
|
|
"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) {
|
|
|
|
|
2013-03-16 11:06:59 +00:00
|
|
|
$hotkeys["j"] = "next_article_noscroll";
|
|
|
|
$hotkeys["k"] = "prev_article_noscroll";
|
2013-03-18 16:59:48 +00:00
|
|
|
$hotkeys["*n"] = "next_feed";
|
|
|
|
$hotkeys["*p"] = "prev_feed";
|
2013-03-16 11:06:59 +00:00
|
|
|
$hotkeys["v"] = "open_in_new_window";
|
|
|
|
$hotkeys["r"] = "feed_refresh";
|
|
|
|
$hotkeys["(32)|space"] = "next_article";
|
|
|
|
$hotkeys["(38)|up"] = "article_scroll_up";
|
|
|
|
$hotkeys["(40)|down"] = "article_scroll_down";
|
2013-03-12 07:35:41 +00:00
|
|
|
|
|
|
|
return $hotkeys;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|