diff --git a/extension.php b/extension.php index f1f30fb..22eb2db 100644 --- a/extension.php +++ b/extension.php @@ -14,6 +14,7 @@ class KagiSummarizerExtension extends Minz_Extension { public function handleConfigureAction() { $this->registerTranslates(); + $this->registerHook('entry_before_display', [$this, 'addSummarizeButton']); if (Minz_Request::isPost()) { $kagi_token = Minz_Request::param('kagi_token', ''); @@ -25,4 +26,9 @@ class KagiSummarizerExtension extends Minz_Extension { FreshRSS_Context::$user_conf->save(); } } + + public function addSummarizeButton(FreshRSS_Entry $entry): FreshRSS_Entry { + $entry->_content('