diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-05-07 13:43:32 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-05-07 13:43:32 -0700 |
commit | 9b9985bd4ba810d5a4e985100c68c544df9bccaf (patch) | |
tree | 7d5ac749aa12a1a113a74731b33d81cbd960d91c /ext/bg | |
parent | 8c1ebe6bcbc3511231c60133cd54722ae97e43ee (diff) |
Improvements
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/templates.js | 8 | ||||
-rw-r--r-- | ext/bg/js/yomichan.js | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index d0749d7b..1ed644a1 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -23,13 +23,13 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia },"2":function(container,depth0,helpers,partials,data,blockParams,depths) { var helper, alias1=container.lambda, alias2=container.escapeExpression; - return " <a href=\"#\" title=\"Add Kanji\" class=\"action-link disabled\" data-sequence=\"" + return " <div class=\"action-bar\">\n <a href=\"#\" title=\"Add Kanji\" class=\"action-link disabled\" data-sequence=\"" + alias2(alias1((depths[1] != null ? depths[1].sequence : depths[1]), depth0)) + "\" data-mode=\"kanji\" data-index=\"" + alias2(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"index","hash":{},"data":data}) : helper))) + "\"><img src=\"" + alias2(alias1((depths[1] != null ? depths[1].root : depths[1]), depth0)) - + "/add_kanji.png\"></a>\n"; + + "/img/add_kanji.png\"></a>\n </div>\n"; },"4":function(container,depth0,helpers,partials,data) { var stack1; @@ -97,13 +97,13 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial },"2":function(container,depth0,helpers,partials,data,blockParams,depths) { var helper, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : {}, alias4=helpers.helperMissing, alias5="function"; - return " <div class=\"action-bar\">\n <a href=\"#\" title=\"Add as expression\" class=\"action-link disabled\" data-sequence=\"" + return " <div class=\"action-bar\">\n <a href=\"#\" title=\"Add term as expression\" class=\"action-link disabled\" data-sequence=\"" + alias2(alias1((depths[1] != null ? depths[1].sequence : depths[1]), depth0)) + "\" data-mode=\"vocabExp\" data-index=\"" + alias2(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"index","hash":{},"data":data}) : helper))) + "\"><img src=\"" + alias2(alias1((depths[1] != null ? depths[1].root : depths[1]), depth0)) - + "/img/add_expression.png\"></a>\n <a href=\"#\" title=\"Add as reading\" class=\"action-link disabled\" data-sequence=\"" + + "/img/add_expression.png\"></a>\n <a href=\"#\" title=\"Add term as reading\" class=\"action-link disabled\" data-sequence=\"" + alias2(alias1((depths[1] != null ? depths[1].sequence : depths[1]), depth0)) + "\" data-mode=\"vocabReading\" data-index=\"" + alias2(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"index","hash":{},"data":data}) : helper))) diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index f1cda178..abbcefe4 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -51,7 +51,7 @@ class Yomichan { onMessage(request, sender, callback) { const {action, params} = request, handlers = { - canAddNotes: (definitions) => this.ankiInvoke('canAddNotes', definitions, 'notes', callback), + canAddNotes: ({definitions, modes}) => this.ankiInvoke('canAddNotes', {definitions: definitions, modes: modes}, 'notes', callback), findKanji: (text) => callback(this.translator.findKanji(text)), findTerm: (text) => callback(this.translator.findTerm(text)), getOptions: () => callback(this.options), |