summaryrefslogtreecommitdiff
path: root/ext/bg/js/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r--ext/bg/js/search.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index aa56d1a6..56316217 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -223,6 +223,7 @@ class DisplaySearch extends Display {
} else {
this.container.textContent = '';
}
+ window.parent.postMessage('popupClose', '*');
} catch (e) {
this.onError(e);
}
@@ -255,7 +256,7 @@ class DisplaySearch extends Display {
} else if (IS_FIREFOX === false) {
curText = (await apiClipboardGet()).trim();
}
- if (curText && (curText !== this.clipboardPrevText)) {
+ if (curText && (curText !== this.clipboardPrevText) && jpIsJapaneseText(curText)) {
if (this.isWanakanaEnabled()) {
this.query.value = window.wanakana.toKana(curText);
} else {