This commit is contained in:
Rudis Muiznieks 2023-09-25 14:03:51 -05:00
parent 47b32e860e
commit 986da803e2
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,7 @@ class KagiSummarizerExtension extends Minz_Extension {
public function addSummarizeButton(FreshRSS_Entry $entry): FreshRSS_Entry {
$this->registerTranslates();
$entry->_content('<p class="kagi-summary"><button onclick="kagiSummarize(\'testing\');">' . _t('ext.kagiSummarizer.ui.summarize_button') . '</button></p>' . $entry->content());
$entry->_content('<p class="kagi-summary"><a class="btn" href="#">' . _t('ext.kagiSummarizer.ui.summarize_button') . '</a></p>' . $entry->content());
return $entry;
}
}

View File

@ -1,3 +1,9 @@
function kagiSummarize(url) {
console.log('got url', url);
if (document.readyState && document.readyState !== 'loading') {
configureKagiButtons();
} else {
document.addEventListener('DOMNodeInserted', configureKagiButtons, false);
}
function configureKagiButtons() {
console.log('configuring kagi buttons');
}