aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/jp/init.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/jp/init.js b/ext/jp/init.js
index d3345a38..56ec8b34 100644
--- a/ext/jp/init.js
+++ b/ext/jp/init.js
@@ -18,6 +18,7 @@
function onInit() {
+ const test = trans.findTerm('食べられない');
chrome.runtime.onMessage.addListener(onMessage);
}
@@ -28,12 +29,12 @@ const res = {
kanjidic: 'jp/data/kanjidic.json'
};
-const trans = new Translator(res, onInit);
+window.trans = new Translator(res, onInit);
function onMessage(request, sender, callback) {
switch (request.action.toLowerCase()) {
case 'define':
- callback(trans.findTerm(request.text));
+ callback(window.trans.findTerm(request.text));
break;
}
}