Add plugins
This commit is contained in:
34
plugins/mykeys/init.php
Normal file
34
plugins/mykeys/init.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*
|
||||
* Add this file to a directory named `mykeys` in the plugin directory. Reload
|
||||
* TT-RSS and enable the plugin via Preferences→Plugins.
|
||||
*/
|
||||
class MyKeys extends Plugin {
|
||||
|
||||
private $host;
|
||||
|
||||
function about() {
|
||||
return [
|
||||
1.1,
|
||||
'Personal keyboard configuration',
|
||||
'dandersson',
|
||||
false];
|
||||
}
|
||||
|
||||
function api_version() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
function init($host) {
|
||||
$this->host = $host;
|
||||
|
||||
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
|
||||
}
|
||||
|
||||
function hook_hotkey_map($hotkeys) {
|
||||
$hotkeys['A'] = 'mark_all_as_read';
|
||||
$hotkeys['r'] = 'feed_refresh';
|
||||
return $hotkeys;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user