diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-20 13:36:54 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-20 13:36:54 -0500 |
commit | 2a95f1420f08b034ae8e12ecffed86aa6f33e53a (patch) | |
tree | 62e632c09be4f5c51919e68c01982f040304e104 /ext/bg/js/settings | |
parent | e14bd75a4f2f25c8fc36ee801d952960987e76ad (diff) |
Move optionsUpdate message handler into Yomichan class
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r-- | ext/bg/js/settings/main.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 78a5870c..870769e5 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -204,14 +204,6 @@ async function onOptionsUpdate({source}) { await formWrite(options); } -function onMessage({action, params}) { - switch (action) { - case 'optionsUpdate': - onOptionsUpdate(params); - break; - } -} - function showExtensionInformation() { const node = document.getElementById('extension-info'); @@ -235,7 +227,7 @@ async function onReady() { storageInfoInitialize(); - chrome.runtime.onMessage.addListener(onMessage); + yomichan.on('optionsUpdate', onOptionsUpdate); } $(document).ready(() => onReady()); |