aboutsummaryrefslogtreecommitdiff
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.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index effa31bc..d99e76e0 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -24,8 +24,8 @@
*/
class DisplaySearch extends Display {
- constructor() {
- super('search');
+ constructor(japaneseUtil) {
+ super('search', japaneseUtil);
this._searchButton = document.querySelector('#search-button');
this._queryInput = document.querySelector('#search-textbox');
this._introElement = document.querySelector('#intro');
@@ -38,6 +38,7 @@ class DisplaySearch extends Display {
this._introAnimationTimer = null;
this._clipboardMonitorEnabled = false;
this._clipboardMonitor = new ClipboardMonitor({
+ japaneseUtil,
clipboardReader: {
getText: async () => (await api.clipboardGet())
}
@@ -129,7 +130,7 @@ class DisplaySearch extends Display {
postProcessQuery(query) {
if (this._wanakanaEnabled) {
try {
- query = wanakana.toKana(query);
+ query = this._japaneseUtil.convertToKana(query);
} catch (e) {
// NOP
}