Compare commits
No commits in common. "10cbec5ce41cf86f20894cc8f113693b93021240" and "093471cda7049d556b01dd310fc79755db80fbd5" have entirely different histories.
10cbec5ce4
...
093471cda7
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
$kagi_token = FreshRSS_Context::$user_conf->kagi_token;
|
||||
$kagi_language = FreshRSS_Context::$user_conf->kagi_language;
|
||||
$kagi_custom_css = FreshRSS_Context::$user_conf->kagi_custom_css;
|
||||
function printLanguageOption($lang, $selected) {
|
||||
echo '<option ' . ($selected == $lang ? 'selected ' : '') . 'value="'. $lang . '">'
|
||||
. _t('ext.kagiSummarizer.configure.lang.' . strtolower($lang == '' ? 'default' : $lang))
|
||||
|
@ -55,13 +54,6 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="kagi_custom_css"><?php echo _t('ext.kagiSummarizer.configure.kagi_custom_css'); ?></label>
|
||||
<div class="group-controls">
|
||||
<input type="text" name="kagi_custom_css" id="kagi_custom_css" value="<?php echo $kagi_custom_css; ?>">
|
||||
<p><small><?php echo _t('ext.kagiSummarizer.configure.kagi_custom_css_help'); ?></small></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-actions">
|
||||
<div class="group-controls">
|
||||
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
|
||||
|
|
|
@ -20,14 +20,12 @@ class KagiSummarizerExtension extends Minz_Extension {
|
|||
}
|
||||
FreshRSS_Context::$user_conf->kagi_token = $kagi_token;
|
||||
FreshRSS_Context::$user_conf->kagi_language = Minz_Request::param('kagi_language', '');
|
||||
FreshRSS_Context::$user_conf->kagi_custom_css = Minz_Request::param('kagi_custom_css', '');
|
||||
FreshRSS_Context::$user_conf->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function addSummarizeButton(FreshRSS_Entry $entry): FreshRSS_Entry {
|
||||
$this->registerTranslates();
|
||||
$custom_css = FreshRSS_Context::$user_conf->kagi_custom_css;
|
||||
$url_summary = Minz_Url::display(array(
|
||||
'c' => 'kagiSummarizer',
|
||||
'a' => 'summarize',
|
||||
|
@ -48,7 +46,7 @@ class KagiSummarizerExtension extends Minz_Extension {
|
|||
. '<a class="btn" href="' . $url_key_moments . '">'
|
||||
. _t('ext.kagiSummarizer.ui.key_moments_button') . '</a>'
|
||||
. '<p class="kagi-status hidden alert"></p>'
|
||||
. '<blockquote class="kagi-content hidden" data-css="' . $custom_css . '"></blockquote></div>'
|
||||
. '<blockquote class="kagi-content hidden"></blockquote></div>'
|
||||
. $entry->content());
|
||||
return $entry;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ return array(
|
|||
'kagi_token' => 'Kagi Token',
|
||||
'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.',
|
||||
'kagi_language' => 'Output Language',
|
||||
'kagi_custom_css' => 'Custom CSS',
|
||||
'kagi_custom_css_help' => 'Applied to the summary container element.',
|
||||
'lang' => array(
|
||||
'default' => 'Default',
|
||||
'bg' => 'Bulgarian',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Kagi Summarizer",
|
||||
"author": "Rudis Muiznieks",
|
||||
"description": "Add buttons to summarize articles with the Kagi Universal Summarizer.",
|
||||
"version": 0.3,
|
||||
"version": 0.2,
|
||||
"entrypoint": "KagiSummarizer",
|
||||
"type": "user"
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ function configureSummarizeButtons() {
|
|||
function setKagiState(container, statusType, statusMsg, summaryText) {
|
||||
var kstatus = container.querySelector('.kagi-status');
|
||||
var content = container.querySelector('.kagi-content');
|
||||
content.style.cssText = content.dataset.css;
|
||||
|
||||
switch(statusType) {
|
||||
case 0:
|
||||
|
|
Loading…
Reference in New Issue