diff options
Diffstat (limited to 'src/background/components/background.js')
-rw-r--r-- | src/background/components/background.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/background/components/background.js b/src/background/components/background.js deleted file mode 100644 index 23131d2..0000000 --- a/src/background/components/background.js +++ /dev/null @@ -1,35 +0,0 @@ -import messages from 'shared/messages'; -import * as commandActions from 'background/actions/command'; - -export default class BackgroundComponent { - constructor(store) { - this.store = store; - - browser.runtime.onMessage.addListener((message, sender) => { - try { - return this.onMessage(message, sender); - } catch (e) { - return browser.tabs.sendMessage(sender.tab.id, { - type: messages.CONSOLE_SHOW_ERROR, - text: e.message, - }); - } - }); - } - - onMessage(message, sender) { - let settings = this.store.getState().setting; - - switch (message.type) { - } - } - - async broadcastSettingsChanged() { - let tabs = await browser.tabs.query({}); - for (let tab of tabs) { - browser.tabs.sendMessage(tab.id, { - type: messages.SETTINGS_CHANGED, - }); - } - } -} |