summaryrefslogtreecommitdiff
path: root/app/views/javascript/main.phtml
blob: c5a14ad06618d36e9675a1920cc7b8f2c721a301 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
	echo '"use strict";', "\n";
	$mark = $this->conf->markWhen ();
	echo 'var ',
		'hide_posts=', ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader') ? 'false' : 'true',
		',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',
		',full_lazyload=', $this->conf->lazyload () === 'yes' && ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader') ? 'true' : 'false',
		',does_lazyload=', $this->conf->lazyload() === 'yes' ? 'true' : 'false';

	$s = $this->conf->shortcuts ();
	echo ',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";