Files
FreshRSS/app/views/javascript/main.phtml
Alexandre Alapetite 4bbe82ff01 Remplace main.phtml non-cachable par main.js cachable
Amélioration des performances en permettant la mise en cache de 10Ko de
JavaScript et en évitant une requête HTTP à chaque action de
l'utilisateur.
2013-10-13 17:11:13 +02:00

20 lines
870 B
PHTML

<?php
$mark = $this->conf->markWhen ();
echo 'var ',
'hide_posts=', $this->conf->displayPosts () === 'no' ? 'true,' : 'false,',
'hide_posts=', $this->conf->displayPosts () === 'no' ? 'true,' : 'false,',
'auto_mark_article=', $mark['article'] === 'yes' ? 'true,' : 'false,',
'auto_mark_site=', $mark['site'] === 'yes' ? 'true,' : 'false,',
'auto_mark_scroll=', $mark['scroll'] === 'yes' ? 'true,' : 'false,',
'auto_load_more=', $this->conf->autoLoadMore () === 'yes' ? 'true,' : 'false,',
'does_lazyload=', $this->conf->lazyload() === 'yes' ? 'true' : 'false', ";\n";
$s = $this->conf->shortcuts ();
echo 'var shortcuts={',
'mark_read:"', $s['mark_read'], '",',
'mark_favorite:"', $s['mark_favorite'], '",',
'go_website:"', $s['go_website'], '",',
'prev_entry:"', $s['prev_entry'], '",',
'next_entry:"', $s['next_entry'], '"',
"};\n";