From 12797301e30013d0ab42c0eca97c59a775825ea0 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Sun, 9 Sep 2018 16:07:16 +0200 Subject: Initial commit of trivial Tiny Tiny RSS plugin to add search and help hotkeys in addition to / (slash). --- README.md | 36 ++++++++++++++++++++++++++++++++++++ additional_search_hotkey/init.php | 30 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 README.md create mode 100644 additional_search_hotkey/init.php diff --git a/README.md b/README.md new file mode 100644 index 0000000..2a3fc46 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Additional search hotkey for Tiny Tiny RSS (tt-rrs, ttrss) + +The default hotkey for search in Tiny Tiny RSS is / (slash) which is bound to search in the current web page text by Firefox and other sane browsers originally. +The only way to change (or amend) the hotkeys Tiny Tiny RSS uses is by adding a plugin. Duh. + +This plugin adds + + h as a hotkey for Tiny Tiny RSS search dialog + H as a hotkey for the help pop-up + +## Credits + +This basically copies the [swap jk plugin](https://git.tt-rss.org/fox/tt-rss/src/master/plugins/swap_jk) and makes it into a search (and help) dialog plugin. +Trivial work. + +## License + +As per the original Tiny Tiny RSS license this plugin is licensed under [GPLv3](https://git.tt-rss.org/fox/tt-rss/src/master/COPYING) +or any [later version](https://git.tt-rss.org/fox/tt-rss/src/master/README.md). + + +## Source + +Hosted at https://git.faster-it.com/ttrss_additional_search_hotkey +Mirrored at https://github.com/fasterit/ttrss_additional_search_hotkey + +## Installation + +Clone this repository and **copy** or **symlink** the `additional_search_hotkey` subdirectory into the `plugins.local` subdirectory of your Tiny Tiny RSS installation. +Go to settings and enable the plugin and allow Tiny Tiny RSS to reload (it asks for this). + +Now pressing the h key should show the search dialog and pressing H (Shift+h) the help dialog. + +## Support + +Commercial support for RSS / ATOM and software using these common standards is available from Faster IT GmbH. diff --git a/additional_search_hotkey/init.php b/additional_search_hotkey/init.php new file mode 100644 index 0000000..5bbf4ca --- /dev/null +++ b/additional_search_hotkey/init.php @@ -0,0 +1,30 @@ +host = $host; + + $host->add_hook($host::HOOK_HOTKEY_MAP, $this); + } + + function hook_hotkey_map($hotkeys) { + + $hotkeys["h"] = "search_dialog"; + $hotkeys["*h"] = "help_dialog"; + + return $hotkeys; + } + + function api_version() { + return 2; + } + +} \ No newline at end of file -- cgit v1.2.3