diff options
Diffstat (limited to 'ext/mixed/js/core.js')
-rw-r--r-- | ext/mixed/js/core.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js index 7fc01c94..0142d594 100644 --- a/ext/mixed/js/core.js +++ b/ext/mixed/js/core.js @@ -244,7 +244,8 @@ const yomichan = (() => { this._messageHandlers = new Map([ ['getUrl', this._onMessageGetUrl.bind(this)], - ['optionsUpdate', this._onMessageOptionsUpdate.bind(this)] + ['optionsUpdate', this._onMessageOptionsUpdate.bind(this)], + ['zoomChanged', this._onMessageZoomChanged.bind(this)] ]); chrome.runtime.onMessage.addListener(this._onMessage.bind(this)); @@ -274,6 +275,10 @@ const yomichan = (() => { _onMessageOptionsUpdate({source}) { this.trigger('optionsUpdate', {source}); } + + _onMessageZoomChanged({oldZoomFactor, newZoomFactor}) { + this.trigger('zoomChanged', {oldZoomFactor, newZoomFactor}); + } } return new Yomichan(); |