summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-04-09 11:42:20 -0700
committerAlex Yatskov <alex@foosoft.net>2017-04-09 11:42:20 -0700
commit3523b85be0be618b00cd9b6992aaf255de12ebfb (patch)
tree342fbe2a0e1ef7319e05dd8ce7f1e2ab7646abbc /ext
parent1b49f91a9b252447ab791ccef7b26a0b8b6062dd (diff)
parent56fe02e9453f2b40a8af52b6f8a8125d67d2ad9f (diff)
Merge branch 'master' into firefox-amo
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/options.html14
-rw-r--r--ext/manifest.json2
-rw-r--r--ext/mixed/js/display.js10
3 files changed, 16 insertions, 10 deletions
diff --git a/ext/bg/options.html b/ext/bg/options.html
index e6c5e8be..e3168ca1 100644
--- a/ext/bg/options.html
+++ b/ext/bg/options.html
@@ -197,14 +197,14 @@
<input type="text" id="interface-server" class="form-control">
</div>
- <p class="help-block">
- Specify the information you would like included in your flashcards in the field editor below.
- Please be aware that Anki requires the first field in the model to be unique. It is highly recommended
- that you set it to <code>{expression}</code> for term flashcards and <code>{character}</code> for
- Kanji flashcards.
- </p>
-
<div id="anki-format">
+ <p class="help-block">
+ Specify the information you would like included in your flashcards in the field editor below.
+ Please be aware that Anki requires the first field in the model to be unique. It is highly recommended
+ that you set it to <code>{expression}</code> for term flashcards and <code>{character}</code> for
+ Kanji flashcards.
+ </p>
+
<ul class="nav nav-tabs">
<li class="active"><a href="#terms" data-toggle="tab">Terms</a></li>
<li><a href="#kanji" data-toggle="tab">Kanji</a></li>
diff --git a/ext/manifest.json b/ext/manifest.json
index 17d063c4..a7175bcd 100644
--- a/ext/manifest.json
+++ b/ext/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Yomichan",
- "version": "1.1.12",
+ "version": "1.1.13",
"description": "Japanese dictionary with Anki integration",
"icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"},
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 64d462ae..0167c605 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -74,7 +74,10 @@ class Display {
if (context) {
for (const definition of definitions) {
- definition.cloze = clozeBuild(context.sentence, definition.source);
+ if (context.sentence) {
+ definition.cloze = clozeBuild(context.sentence, definition.source);
+ }
+
definition.url = context.url;
}
}
@@ -108,7 +111,10 @@ class Display {
if (context) {
for (const definition of definitions) {
- definition.cloze = clozeBuild(context.sentence);
+ if (context.sentence) {
+ definition.cloze = clozeBuild(context.sentence);
+ }
+
definition.url = context.url;
}
}