\n
\n
\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.playback : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "
\n\n"
diff --git a/ext/bg/popup.html b/ext/bg/popup.html
index 22fc0d40..e223e241 100644
--- a/ext/bg/popup.html
+++ b/ext/bg/popup.html
@@ -18,12 +18,12 @@
-
+
-
-
+
+
diff --git a/ext/manifest.json b/ext/manifest.json
index e759c4dc..ae7cf8e3 100644
--- a/ext/manifest.json
+++ b/ext/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Yomichan",
- "version": "1.1.7",
+ "version": "1.1.8",
"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 1b629dec..db14a43c 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -212,59 +212,93 @@ class Display {
const handlers = {
27: /* escape */ () => {
this.clearSearch();
+ return true;
},
33: /* page up */ () => {
- this.entryScroll(this.index - 3, true);
+ if (e.altKey) {
+ this.entryScroll(this.index - 3, true);
+ return true;
+ }
},
34: /* page down */ () => {
- this.entryScroll(this.index + 3, true);
+ if (e.altKey) {
+ this.entryScroll(this.index + 3, true);
+ return true;
+ }
},
35: /* end */ () => {
- this.entryScroll(this.definitions.length - 1, true);
+ if (e.altKey) {
+ this.entryScroll(this.definitions.length - 1, true);
+ return true;
+ }
},
36: /* home */ () => {
- this.entryScroll(0, true);
+ if (e.altKey) {
+ this.entryScroll(0, true);
+ return true;
+ }
},
38: /* up */ () => {
- this.entryScroll(this.index - 1, true);
+ if (e.altKey) {
+ this.entryScroll(this.index - 1, true);
+ return true;
+ }
},
40: /* down */ () => {
- this.entryScroll(this.index + 1, true);
+ if (e.altKey) {
+ this.entryScroll(this.index + 1, true);
+ return true;
+ }
},
66: /* b */ () => {
- this.sourceBack();
+ if (e.altKey) {
+ this.sourceBack();
+ return true;
+ }
},
69: /* e */ () => {
- noteTryAdd('term-kanji');
+ if (e.altKey) {
+ noteTryAdd('term-kanji');
+ return true;
+ }
},
75: /* k */ () => {
- noteTryAdd('kanji');
+ if (e.altKey) {
+ noteTryAdd('kanji');
+ return true;
+ }
},
82: /* r */ () => {
- noteTryAdd('term-kana');
+ if (e.altKey) {
+ noteTryAdd('term-kana');
+ return true;
+ }
},
80: /* p */ () => {
- if ($('.entry').eq(this.index).data('type') === 'term') {
- this.audioPlay(this.definitions[this.index]);
+ if (e.altKey) {
+ if ($('.entry').eq(this.index).data('type') === 'term') {
+ this.audioPlay(this.definitions[this.index]);
+ }
+
+ return true;
}
}
};
const handler = handlers[e.keyCode];
- if (handler && (e.altKey || !['e', 'k', 'p'].includes(e.keyCode))) {
+ if (handler && handler()) {
e.preventDefault();
- handler();
}
}
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
index 7a2df8db..acd79036 100644
--- a/tmpl/kanji.html
+++ b/tmpl/kanji.html
@@ -1,7 +1,7 @@
{{#*inline "kanji"}}
-
+
{{#if addable}}
{{/if}}
diff --git a/tmpl/terms.html b/tmpl/terms.html
index 83b16106..dc50efe2 100644
--- a/tmpl/terms.html
+++ b/tmpl/terms.html
@@ -20,7 +20,7 @@
{{#*inline "term"}}