1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-25 11:57:42 +02:00
ttrss/plugins/hotkeys_noscroll/init.php

32 lines
585 B
PHP
Raw Normal View History

2019-02-20 13:32:53 +01:00
<?php
class Hotkeys_Noscroll extends Plugin {
private $host;
function about() {
return array(1.0,
"n/p (and up/down) hotkeys move between articles without scrolling",
2019-02-20 13:32:53 +01:00
"fox");
}
function init($host) {
$this->host = $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 13:32:53 +01:00
$hotkeys["n"] = "next_article_noscroll";
$hotkeys["p"] = "prev_article_noscroll";
return $hotkeys;
}
function api_version() {
return 2;
}
}