From a0fa1594cbed7bd70654f506e2104e724bde4ac4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 Mar 2021 15:04:48 +0300 Subject: initial --- init.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 init.php diff --git a/init.php b/init.php new file mode 100644 index 0000000..c1169fc --- /dev/null +++ b/init.php @@ -0,0 +1,33 @@ +host = $host; + + $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); + } + + function about() { + return array(null, + "Adds a button to close article panel", + "fox"); + } + + function get_css() { + return ".post .header .buttons i.material-icons.icon-close-article { color : red; }"; + } + + function hook_article_button($line) { + if (!get_pref(Prefs::COMBINED_DISPLAY_MODE)) { + return "close"; + } + } + + function api_version() { + return 2; + } + +} -- cgit v1.2.3