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.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 266cccc8..684ea6d3 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -22,6 +22,7 @@
* apiClipboardGet
* apiOptionsSet
* apiTermsFind
+ * wanakana
*/
class DisplaySearch extends Display {
@@ -83,7 +84,7 @@ class DisplaySearch extends Display {
if (this.options.general.enableWanakana === true) {
this.wanakanaEnable.checked = true;
- window.wanakana.bind(this.query);
+ wanakana.bind(this.query);
} else {
this.wanakanaEnable.checked = false;
}
@@ -250,9 +251,9 @@ class DisplaySearch extends Display {
onWanakanaEnableChange(e) {
const enableWanakana = e.target.checked;
if (enableWanakana) {
- window.wanakana.bind(this.query);
+ wanakana.bind(this.query);
} else {
- window.wanakana.unbind(this.query);
+ wanakana.unbind(this.query);
}
apiOptionsSet({general: {enableWanakana}}, this.getOptionsContext());
}
@@ -292,7 +293,7 @@ class DisplaySearch extends Display {
}
setQuery(query) {
- const interpretedQuery = this.isWanakanaEnabled() ? window.wanakana.toKana(query) : query;
+ const interpretedQuery = this.isWanakanaEnabled() ? wanakana.toKana(query) : query;
this.query.value = interpretedQuery;
this.queryParser.setText(interpretedQuery);
}