ttrss/plugins/hotkeys_noscroll/init.php

28 lines
545 B
PHP
Raw Permalink Normal View History

2019-02-20 12:32:53 +00:00
<?php
class Hotkeys_Noscroll extends Plugin {
function about() {
return array(null,
"n/p (and up/down) hotkeys move between articles without scrolling",
2019-02-20 12:32:53 +00:00
"fox");
}
function init($host) {
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
function hook_hotkey_map($hotkeys) {
$hotkeys["(40)|Down"] = "next_article_noscroll";
$hotkeys["(38)|Up"] = "prev_article_noscroll";
2019-02-20 12:32:53 +00:00
$hotkeys["n"] = "next_article_noscroll";
$hotkeys["p"] = "prev_article_noscroll";
return $hotkeys;
}
function api_version() {
return 2;
}
}