wip
This commit is contained in:
parent
47b32e860e
commit
986da803e2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue