aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-20 13:36:54 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-20 13:36:54 -0500
commit2a95f1420f08b034ae8e12ecffed86aa6f33e53a (patch)
tree62e632c09be4f5c51919e68c01982f040304e104 /ext/fg
parente14bd75a4f2f25c8fc36ee801d952960987e76ad (diff)
Move optionsUpdate message handler into Yomichan class
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/frontend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index c8e112a7..1d63d928 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -54,6 +54,7 @@ class Frontend extends TextScanner {
try {
await this.updateOptions();
+ yomichan.on('optionsUpdate', () => this.updateOptions());
chrome.runtime.onMessage.addListener(this.onRuntimeMessage.bind(this));
this.isPreparedPromiseResolve();
} catch (e) {
@@ -200,6 +201,5 @@ Frontend._windowMessageHandlers = new Map([
]);
Frontend._runtimeMessageHandlers = new Map([
- ['optionsUpdate', (self) => { self.updateOptions(); }],
['popupSetVisibleOverride', (self, {visible}) => { self.popup.setVisibleOverride(visible); }]
]);