From 1a8770f8f48aeb7fbbcd3b569bd37a4a88ccfdb4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Feb 2019 15:32:53 +0300 Subject: [PATCH] add plugins/hotkeys_noscroll --- plugins/hotkeys_noscroll/init.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/hotkeys_noscroll/init.php diff --git a/plugins/hotkeys_noscroll/init.php b/plugins/hotkeys_noscroll/init.php new file mode 100644 index 000000000..18f5aedab --- /dev/null +++ b/plugins/hotkeys_noscroll/init.php @@ -0,0 +1,31 @@ +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"; + $hotkeys["n"] = "next_article_noscroll"; + $hotkeys["p"] = "prev_article_noscroll"; + + return $hotkeys; + } + + function api_version() { + return 2; + } + +}