aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 484473c7..3d8c4c4a 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -127,7 +127,8 @@ class Backend {
['getOrCreateSearchPopup', {async: true, contentScript: true, handler: this._onApiGetOrCreateSearchPopup.bind(this)}],
['isTabSearchPopup', {async: true, contentScript: true, handler: this._onApiIsTabSearchPopup.bind(this)}],
['triggerDatabaseUpdated', {async: false, contentScript: true, handler: this._onApiTriggerDatabaseUpdated.bind(this)}],
- ['testMecab', {async: true, contentScript: true, handler: this._onApiTestMecab.bind(this)}]
+ ['testMecab', {async: true, contentScript: true, handler: this._onApiTestMecab.bind(this)}],
+ ['textHasJapaneseCharacters', {async: false, contentScript: true, handler: this._onApiTextHasJapaneseCharacters.bind(this)}]
]);
this._messageHandlersWithProgress = new Map([
]);
@@ -727,6 +728,10 @@ class Backend {
return true;
}
+ _onApiTextHasJapaneseCharacters({text}) {
+ return this._japaneseUtil.isStringPartiallyJapanese(text);
+ }
+
// Command handlers
async _onCommandOpenSearchPage(params) {