This commit is contained in:
Oleg Mokhov
2015-06-20 12:26:08 +03:00
committed by mokhov
parent a716969f4e
commit f3546ef3a5
85 changed files with 16682 additions and 1 deletions

View File

@@ -0,0 +1,41 @@
module.exports = function (bt) {
bt.setDefaultView('chitalka-fb2', 'default');
bt.match('chitalka-fb2*', function (ctx) {
ctx.setInitOption('keyboard', true);
ctx.setInitOption('url', ctx.getParam('url'));
ctx.enableAutoInit();
var footnotes = ctx.getParam('footnotes') || false;
if (footnotes) {
ctx.setState('footnotes', footnotes);
}
var pages = ctx.getParam('pages') || false;
if (pages) {
ctx.setState('pages', pages);
}
var content = [
{
elem: 'title'
},
{
elem: 'bookholder'
}];
if (ctx.getParam('ui')) {
ctx.setInitOption('ui', true);
content.push({
elem: 'ui',
content: ctx.getParam('ui')
});
}
ctx.setContent(content);
});
bt.match('chitalka-fb2*__ui', function (ctx) {
ctx.setContent(ctx.getParam('content'));
});
};