From 177940981ed9c4f096ad7db20f0b7ee044fd7b17 Mon Sep 17 00:00:00 2001 From: Erwan Ameil Date: Thu, 16 Nov 2017 13:03:38 +0000 Subject: Open adjacent tabs and background tabs --- src/background/actions/tab.js | 6 +----- src/background/components/background.js | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/background') diff --git a/src/background/actions/tab.js b/src/background/actions/tab.js index e512b6f..d996b9f 100644 --- a/src/background/actions/tab.js +++ b/src/background/actions/tab.js @@ -1,9 +1,5 @@ -const openNewTab = (url) => { - return browser.tabs.create({ url: url }); -}; - const openToTab = (url, tab) => { return browser.tabs.update(tab.id, { url: url }); }; -export { openToTab, openNewTab }; +export { openToTab }; diff --git a/src/background/components/background.js b/src/background/components/background.js index 2d94310..6026684 100644 --- a/src/background/components/background.js +++ b/src/background/components/background.js @@ -30,7 +30,8 @@ export default class BackgroundComponent { case messages.OPEN_URL: if (message.newTab) { return this.store.dispatch( - tabActions.openNewTab(message.url), sender); + commands.tabopenCommand(message.url, message.background, + settings.value.openAdjacentTabs), sender); } return this.store.dispatch( tabActions.openToTab(message.url, sender.tab), sender); -- cgit v1.2.3