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('

Hello World

' . $entry->_content()); + return $entry; + } } diff --git a/i18n/en/ext.php b/i18n/en/ext.php index a784fbe..ddd4b18 100644 --- a/i18n/en/ext.php +++ b/i18n/en/ext.php @@ -4,7 +4,7 @@ return array( 'kagiSummarizer' => array( 'configure' => array( 'kagi_token' => 'Kagi Token', - 'kagi_token_help' => 'Copy and paste the "Session Link" from you Kagi Account settings.' + 'kagi_token_help' => 'Copy and paste the "Session Link" from your Kagi Account settings.' ) ) );