This commit is contained in:
Rudis Muiznieks 2023-09-25 13:05:04 -05:00
parent b539f2b030
commit 68a7345dac
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 7 additions and 1 deletions

View File

@ -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('<h1>Hello World</h1>' . $entry->_content());
return $entry;
}
}

View File

@ -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 <a href="https://kagi.com/settings?p=user_details" target="_blank">Kagi Account</a> settings.'
'kagi_token_help' => 'Copy and paste the "Session Link" from your <a href="https://kagi.com/settings?p=user_details" target="_blank">Kagi Account</a> settings.'
)
)
);