]>
Commit | Line | Data |
---|---|---|
e218c5f5 AD |
1 | <?php |
2 | class Swap_JK extends Plugin { | |
3 | ||
e218c5f5 AD |
4 | private $host; |
5 | ||
6 | function about() { | |
7 | return array(1.0, | |
8 | "Swap j and k hotkeys (for vi brethren)", | |
9 | "fox"); | |
10 | } | |
11 | ||
12 | function init($host) { | |
e218c5f5 AD |
13 | $this->host = $host; |
14 | ||
15 | $host->add_hook($host::HOOK_HOTKEY_MAP, $this); | |
16 | } | |
17 | ||
18 | function hook_hotkey_map($hotkeys) { | |
19 | ||
20 | $hotkeys["j"] = "next_feed"; | |
21 | $hotkeys["k"] = "prev_feed"; | |
22 | ||
23 | return $hotkeys; | |
106a3de9 | 24 | } |
e218c5f5 | 25 | |
106a3de9 AD |
26 | function api_version() { |
27 | return 2; | |
e218c5f5 | 28 | } |
106a3de9 | 29 | |
21ce7d9e | 30 | } |