diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-03-23 20:39:21 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-03-23 20:39:21 -0700 |
commit | 14f855ee75c6c95ac1c6c3f3b655dd0ae8c0e7ff (patch) | |
tree | 5260063e3603ebecb8e538e8a6007dd58e158ef7 /ext | |
parent | 62a47278b5f5751ceaac18a26659c794fbc0ed84 (diff) |
Tests
Diffstat (limited to 'ext')
-rw-r--r-- | ext/jp/init.js | 5 |
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; } } |