summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/options-form.js12
-rw-r--r--ext/bg/js/options.js6
-rw-r--r--ext/bg/js/templates.js6
-rw-r--r--ext/bg/js/yomichan.js10
-rw-r--r--ext/bg/options.html12
5 files changed, 23 insertions, 23 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index a3250ab3..99d01db4 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -31,7 +31,7 @@ function fieldsToDict(selection) {
}
function modelIdToFieldOptKey(id) {
- return {'anki-vocab-model': 'ankiVocabFields', 'anki-kanji-model': 'ankiKanjiFields'}[id];
+ return {'anki-term-model': 'ankiTermFields', 'anki-kanji-model': 'ankiKanjiFields'}[id];
}
function formToOptions(section, callback) {
@@ -50,9 +50,9 @@ function formToOptions(section, callback) {
case 'anki':
optsNew.ankiCardTags = $('#anki-card-tags').val().split(/[,; ]+/);
optsNew.sentenceExtent = parseInt($('#sentence-extent').val(), 10);
- optsNew.ankiVocabDeck = $('#anki-vocab-deck').val();
- optsNew.ankiVocabModel = $('#anki-vocab-model').val();
- optsNew.ankiVocabFields = fieldsToDict($('#vocab .anki-field-value'));
+ optsNew.ankiTermDeck = $('#anki-term-deck').val();
+ optsNew.ankiTermModel = $('#anki-term-model').val();
+ optsNew.ankiTermFields = fieldsToDict($('#term .anki-field-value'));
optsNew.ankiKanjiDeck = $('#anki-kanji-deck').val();
optsNew.ankiKanjiModel = $('#anki-kanji-model').val();
optsNew.ankiKanjiFields = fieldsToDict($('#kanji .anki-field-value'));
@@ -73,7 +73,7 @@ function populateAnkiDeckAndModel(opts) {
names.forEach((name) => ankiDeck.append($('<option/>', {value: name, text: name})));
}
- $('#anki-vocab-deck').val(opts.ankiVocabDeck);
+ $('#anki-term-deck').val(opts.ankiTermDeck);
$('#anki-kanji-deck').val(opts.ankiKanjiDeck);
}});
@@ -84,7 +84,7 @@ function populateAnkiDeckAndModel(opts) {
names.forEach((name) => ankiModel.append($('<option/>', {value: name, text: name})));
}
- populateAnkiFields($('#anki-vocab-model').val(opts.ankiVocabModel), opts);
+ populateAnkiFields($('#anki-term-model').val(opts.ankiTermModel), opts);
populateAnkiFields($('#anki-kanji-model').val(opts.ankiKanjiModel), opts);
}});
}
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 3f31aff8..1c54dfe7 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -27,9 +27,9 @@ function sanitizeOptions(options) {
enableAnkiConnect: false,
ankiCardTags: ['yomichan'],
sentenceExtent: 200,
- ankiVocabDeck: '',
- ankiVocabModel: '',
- ankiVocabFields: {},
+ ankiTermDeck: '',
+ ankiTermModel: '',
+ ankiTermFields: {},
ankiKanjiDeck: '',
ankiKanjiModel: '',
ankiKanjiFields: {}
diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js
index eec28982..1f9e3c30 100644
--- a/ext/bg/js/templates.js
+++ b/ext/bg/js/templates.js
@@ -112,15 +112,15 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
},"4":function(container,depth0,helpers,partials,data,blockParams,depths) {
var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda;
- return " <a href=\"#\" title=\"Add vocabulary as expression\" class=\"action-add-note disabled\" data-mode=\"vocab_kanji\" data-index=\""
+ return " <a href=\"#\" title=\"Add term as expression\" class=\"action-add-note disabled\" data-mode=\"term_kanji\" data-index=\""
+ alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"index","hash":{},"data":data}) : helper)))
+ "\"><img src=\""
+ alias4(alias5((depths[1] != null ? depths[1].root : depths[1]), depth0))
- + "/img/add_vocab_kanji.png\"></a>\n <a href=\"#\" title=\"Add vocabulary as reading\" class=\"action-add-note disabled\" data-mode=\"vocab_kana\" data-index=\""
+ + "/img/add_term_kanji.png\"></a>\n <a href=\"#\" title=\"Add term as reading\" class=\"action-add-note disabled\" data-mode=\"term_kana\" data-index=\""
+ alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"index","hash":{},"data":data}) : helper)))
+ "\"><img src=\""
+ alias4(alias5((depths[1] != null ? depths[1].root : depths[1]), depth0))
- + "/img/add_vocab_kana.png\"></a>\n";
+ + "/img/add_term_kana.png\"></a>\n";
},"6":function(container,depth0,helpers,partials,data) {
var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", buffer =
" <div class=\"term-expression\"><ruby>";
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 6aca4b5d..c6288e57 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -183,12 +183,12 @@ class Yomichan {
value = '';
break;
case 'expression':
- if (mode === 'vocab_kana' && definition.reading) {
+ if (mode === 'term_kana' && definition.reading) {
value = definition.reading;
}
break;
case 'reading':
- if (mode === 'vocab_kana') {
+ if (mode === 'term_kana') {
value = null;
}
break;
@@ -227,9 +227,9 @@ class Yomichan {
note.deckName = this.options.ankiKanjiDeck;
note.modelName = this.options.ankiKanjiModel;
} else {
- fields = this.options.ankiVocabFields;
- note.deckName = this.options.ankiVocabDeck;
- note.modelName = this.options.ankiVocabModel;
+ fields = this.options.ankiTermFields;
+ note.deckName = this.options.ankiTermDeck;
+ note.modelName = this.options.ankiTermModel;
const audio = {
kanji: definition.expression,
diff --git a/ext/bg/options.html b/ext/bg/options.html
index 7e03ea15..331e5e98 100644
--- a/ext/bg/options.html
+++ b/ext/bg/options.html
@@ -98,23 +98,23 @@
</div>
<ul class="nav nav-tabs col-sm-offset-2 col-sm-10">
- <li class="active"><a href="#vocab" data-toggle="tab">Vocabulary</a></li>
+ <li class="active"><a href="#term" data-toggle="tab">Terms</a></li>
<li><a href="#kanji" data-toggle="tab">Kanji</a></li>
</ul>
<div class="tab-content col-sm-offset-2 col-sm-10">
- <div id="vocab" class="tab-pane fade in active">
+ <div id="term" class="tab-pane fade in active">
<div class="form-group">
- <label class="col-sm-2 control-label" for="anki-vocab-deck">Deck</label>
+ <label class="col-sm-2 control-label" for="anki-term-deck">Deck</label>
<div class="col-sm-10">
- <select class="form-control anki-deck" id="anki-vocab-deck"></select>
+ <select class="form-control anki-deck" id="anki-term-deck"></select>
</div>
</div>
<div class="form-group">
- <label class="col-sm-2 control-label" for="anki-vocab-model">Model</label>
+ <label class="col-sm-2 control-label" for="anki-term-model">Model</label>
<div class="col-sm-10">
- <select class="form-control anki-model" id="anki-vocab-model"></select>
+ <select class="form-control anki-model" id="anki-term-model"></select>
</div>
</div>