Initial commit

This commit is contained in:
2019-05-01 18:21:04 +02:00
commit d8c4956a22
2 changed files with 64 additions and 0 deletions

36
init.php Normal file
View File

@ -0,0 +1,36 @@
<?php
class Toggle_Sort_Titles extends Plugin {
private $host;
function about() {
return array(1.0,
"Add a 't' hotkey to toggle headlines sorting by title and by default",
"ggrandou" );
}
function init($host) {
$this->host = $host;
$host->add_hook($host::HOOK_HOTKEY_INFO, $this);
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
function hook_hotkey_info($hotkeys) {
$hotkeys[__("Feed")]["feed_toggle_title"] = __("Toggle Headlines grouping by Titles");
return $hotkeys;
}
function hook_hotkey_map($hotkeys) {
$hotkeys["t"] = "feed_toggle_title";
return $hotkeys;
}
function get_js() {
return file_get_contents(__DIR__ . "/init.js");
}
function api_version() {
return 2;
}
}
?>