aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 10a42f47..c9f53253 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -47,6 +47,10 @@ class Yomichan {
}
}
+ onImport({state, progress}) {
+ console.log(`${state}: ${progress}`);
+ }
+
onMessage(request, sender, callback) {
const {action, params} = request, method = this['api_' + action];
@@ -90,7 +94,7 @@ class Yomichan {
break;
case 'loading':
chrome.browserAction.setBadgeText({text: '...'});
- this.translator.loadData().then(() => this.setState('enabled'));
+ this.translator.loadData(this.onImport.bind(this)).then(() => this.setState('enabled'));
break;
}