From 34ea9979abf1474eaaa581c2c32406c255c5f61c Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Thu, 26 Jan 2017 20:22:52 -0800 Subject: [PATCH] wip --- ext/bg/js/templates.js | 2 +- ext/bg/js/util.js | 5 +++-- ext/bg/js/yomichan.js | 3 +-- tmpl/fields.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index 416f118e..4ef66de8 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -145,7 +145,7 @@ templates['fields.html'] = template({"1":function(container,depth0,helpers,parti var stack1; return "
\n" - + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.grouped : depth0),{"name":"if","hash":{},"fn":container.program(36, data, 0),"inverse":container.program(42, data, 0),"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.group : depth0),{"name":"if","hash":{},"fn":container.program(36, data, 0),"inverse":container.program(42, data, 0),"data":data})) != null ? stack1 : "") + "
\n"; },"36":function(container,depth0,helpers,partials,data) { var stack1; diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index 253fcd0f..108c88e7 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -201,7 +201,7 @@ function sortTags(tags) { }); } -function formatField(field, definition, mode, html) { +function formatField(field, definition, mode, options) { const markers = [ 'audio', 'character', @@ -221,7 +221,8 @@ function formatField(field, definition, mode, html) { const data = { marker, definition, - html, + group: options.general.groupResults, + html: options.anki.htmlCards, modeTermKanji: mode === 'term_kanji', modeTermKana: mode === 'term_kana', modeKanji: mode === 'kanji' diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index 89608a5b..720c450a 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -146,11 +146,10 @@ class Yomichan { fields[name], definition, mode, - this.options.anki.htmlCards + this.options ); } - // console.log(note); return note; } diff --git a/tmpl/fields.html b/tmpl/fields.html index c4c2ef03..d5c9f1db 100644 --- a/tmpl/fields.html +++ b/tmpl/fields.html @@ -33,7 +33,7 @@ {{#*inline "glossary"}}
-{{#if grouped}} +{{#if group}} {{#if definitions.[1]}}
    {{#each definitions}}