fix kanji back button on search page
This commit is contained in:
parent
aaff51da85
commit
e782a43432
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Yomichan",
|
"name": "Yomichan",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6",
|
||||||
|
|
||||||
"description": "Japanese dictionary with Anki integration",
|
"description": "Japanese dictionary with Anki integration",
|
||||||
"icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"},
|
"icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"},
|
||||||
|
@ -60,8 +60,8 @@ class Display {
|
|||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
for (const definition of definitions) {
|
for (const definition of definitions) {
|
||||||
definition.sentence = context.sentence;
|
definition.sentence = context.sentence || '';
|
||||||
definition.url = context.url;
|
definition.url = context.url || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,12 +86,11 @@ class Display {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const link = $(e.target);
|
const link = $(e.target);
|
||||||
if (context) {
|
context = context || {};
|
||||||
context.source = {
|
context.source = {
|
||||||
definitions,
|
definitions,
|
||||||
index: Display.entryIndexFind(link)
|
index: Display.entryIndexFind(link)
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
this.kanjiFind(link.text()).then(kanjiDefs => {
|
this.kanjiFind(link.text()).then(kanjiDefs => {
|
||||||
this.showKanjiDefs(kanjiDefs, options, context);
|
this.showKanjiDefs(kanjiDefs, options, context);
|
||||||
@ -115,8 +114,8 @@ class Display {
|
|||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
for (const definition of definitions) {
|
for (const definition of definitions) {
|
||||||
definition.sentence = context.sentence;
|
definition.sentence = context.sentence || '';
|
||||||
definition.url = context.url;
|
definition.url = context.url || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user